git被阻止,如何安装npm模块 [英] git is blocked, how to install npm modules
问题描述
我们通过代理连接, git被阻止(不是网站,而是git //:),我们尝试了egit,git on windows,有和没有代理,但没有一个克隆到本地发生。
现在问题是安装npm模块,我尝试从git网站(通过web)下载模块(zip)并尝试使用本地安装,其中工作,但这里的问题是大量的依赖关系,逐个拉取模块以填充依赖关系(和内部依赖关系)并不容易。
所以如何解决这个问题,我觉得有三种方法可以找到解决方案:
Copied from this answer https://stackoverflow.com/a/10729634/1095114
If this is an issue with your firewall blocking the git: protocol port (9418), then you should make a more persistent change so you don't have to remember to issue commands suggested by other posts for every git repo. This also just works for submodules that might be using the git://
protocol too.
Simply issue the following command:
git config --global url."https://".insteadOf git://
This simply adds the following two lines to ~/.gitconfig:
[url "https://"]
insteadOf = git://
Now, as if by magic, all git commands will perform a substitution of git://
to https://
这篇关于git被阻止,如何安装npm模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!