Visual Studio - 管理Bower包 - ECMDERR无法执行“git ls-remote --tags --heads https:// ...”,退出#128

时间:2017-08-08 15:18:25

标签: c# asp.net-mvc visual-studio visual-studio-2017 bower

背景

我创建了空的ASP .NET MVC项目,打开了 Manage Bower Packages 窗口并尝试安装foo包。 我收到以下错误:

PATH=.\node_modules\.bin;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Web\External;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\cmd;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Web\External\Bower.cmd" install foo#v4.0.0 --force-latest --save
bower foo#v4.0.0       not-cached https://github.com/bar/foo.git#v4.0.0
bower foo#v4.0.0          resolve https://github.com/bar/foo.git#v4.0.0
bower foo#v4.0.0          ECMDERR Failed to execute "git ls-remote --tags --heads https://github.com/bar/foo.git", exit code of #128

问题
如何修复上述错误?

注意
这个问题严格地与Visual Studio有关。在这种情况下,运行以下命令无法修复问题。

git config --global url."https://".insteadOf git://

0 个答案:

没有答案