Node.js npm不';t尊重git';s";而不是;从镜像克隆时的配置

Node.js npm不';t尊重git';s";而不是;从镜像克隆时的配置,node.js,npm,Node.js,Npm,我设置了以下命令,以防止npm下载带有GIT协议的npm包,因为我的服务器以某种方式阻止了它: git config --global url."https://github.com/".insteadOf git@github.com 但是,当运行npm install时,仍然会发生错误,因为在从镜像进行repo克隆的上下文中,程序包尝试使用Git协议: npm ERR! git clone --template=/home/jenkins/.npm/_git-remotes/_templa

我设置了以下命令,以防止npm下载带有GIT协议的npm包,因为我的服务器以某种方式阻止了它:

git config --global url."https://github.com/".insteadOf git@github.com
但是,当运行
npm install
时,仍然会发生错误,因为在从镜像进行repo克隆的上下文中,程序包尝试使用Git协议:

npm ERR! git clone --template=/home/jenkins/.npm/_git-remotes/_templates --mirror git://github.com/isaacs/js-yaml.git /home/jenkins/.npm/_git-remotes/git-github-com-isaacs-js-yaml-git-dd3d7a8b: Cloning into bare repository '/home/jenkins/.npm/_git-remotes/git-github-com-isaacs-js-yaml-git-dd3d7a8b'...
npm ERR! git clone --template=/home/jenkins/.npm/_git-remotes/_templates --mirror git://github.com/isaacs/js-yaml.git /home/jenkins/.npm/_git-remotes/git-github-com-isaacs-js-yaml-git-dd3d7a8b: 
npm ERR! git clone --template=/home/jenkins/.npm/_git-remotes/_templates --mirror git://github.com/isaacs/js-yaml.git /home/jenkins/.npm/_git-remotes/git-github-com-isaacs-js-yaml-git-dd3d7a8b: fatal: unable to connect to github.com:
npm ERR! git clone --template=/home/jenkins/.npm/_git-remotes/_templates --mirror git://github.com/isaacs/js-yaml.git /home/jenkins/.npm/_git-remotes/git-github-com-isaacs-js-yaml-git-dd3d7a8b: github.com[0: 192.30.252.129]: errno=Connection refused

我比较了安装在node_模块中的模块和package.json中声明的模块,唯一缺少的是
grunt contrib nodeunit
,奇怪的是,它不依赖于
js yaml
。。。那么,它为什么要克隆其回购协议呢?在任何情况下,有没有办法在指定镜像时强制使用HTTPS?

我可以使用(git://而不是git@)来解决这个问题

git config --global url."http://github.com".insteadOf git://github.com