在Visual Studio 2015中,使用bower,我的包恢复在防火墙后面失败,错误类似于:
ECMDERR无法执行"git ls-remote --tags --heads git://github.com/jzaefferer/jquery-validation.git",退出代码#-532462766
我已经更新了我的git配置http
而不是git.当我从命令行运行时,命令成功:
但Visual Studio或其中一个组件似乎是使用git
而不是http
.
使用Visual Studio 2015和Bower进行包管理.当它不在防火墙后面时效果很好,但是当在防火墙后面时,我无法使用该git://
协议.
在SO(示例)的许多其他地方记录的解决方案是运行:
git config --global url."http://".insteadOf git://
Run Code Online (Sandbox Code Playgroud)
我这样做了,现在git config -l
看起来像:
ore.symlinks=false
core.autocrlf=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
pack.packsizelimit=2g
help.format=html
http.sslcainfo=/bin/curl-ca-bundle.crt
sendemail.smtpserver=/bin/msmtp.exe
diff.astextplain.textconv=astextplain
rebase.autosquash=true
user.name=Sean Killeen
user.email=SeanKilleen@gmail.com
url.http://.insteadof=git://
Run Code Online (Sandbox Code Playgroud)
但是尽管如此,Visual Studio/npm还是不尊重我的配置,或者使用旧的缓存版本.
根据npm问题的这个帖子,我看到npm(可能是bower在VS中使用的)使用了git@
语法.即使这不是我在输出中看到的,我想我会试一试.
我跑了:
git config --global url."https://github.com/".insteadOf git@github.com:
Run Code Online (Sandbox Code Playgroud)
然后我重新启动Visual Studio,但问题仍然存在.我读到的修复可能永远不适用.
有关如何修复的任何想法?