我正在使用Bower安装几个库。出于演示目的,我在这里安装bootstrap。不管是什么包,我都会收到以下错误:
C:\Scott>bower install bootstrap
bower not-cached git://github.com/twbs/bootstrap.git#*
bower resolve git://github.com/twbs/bootstrap.git#*
bower ECMDERR Failed to execute "git ls-remote --tags --heads git://github
.com/twbs/bootstrap.git", exit code of #128
Additional error details:
fatal: unable to access 'https://github.com/twbs/bootstrap.git/': Failed connect
to github.com:443; No error
我尝试使用下面的解决方案来删除第一个错误--我在这个search中发现了这个错误
git config --global url."https://".insteadOf git://
但是,这不起作用,该页面上找到的任何其他解决方案也不起作用。在搜索第二个错误的解决方案时,如果您在公司网络/防火墙后面,似乎为代理服务器设置用户名/密码将解决该问题。但是,我没有使用代理服务器,因为我使用的是家用pc/网络(windows 7 x64)。
谢谢!
编辑:带有错误的命令窗口:
发布于 2014-02-08 12:02:50
端口22在我的计算机上被阻止。一旦我找到了阻塞它的原因并打开了端口,我就可以毫无问题地运行bower install cmd了。
发布于 2014-04-15 22:55:17
我知道这不是“修复”问题,但您可以使用
git config --global url."https://".insteadOf git://
告诉git使用HTTPS而不是GIT,这样我就可以安装npm依赖项了。
发布于 2014-02-06 16:35:24
相反,要运行此命令:
git ls-remote --tags --heads git://github.com/twbs/bootstrap.git
您应该运行以下命令:
git ls-remote --tags --heads git@github.com:twbs/bootstrap.git
或
git ls-remote --tags --heads https://github.com/twbs/bootstrap.git
或者你可以运行git ls-remote --tags --heads git://github.com/twbs/bootstrap.git
,但是你需要让git总是这样使用https:
git config --global url."https://".insteadOf git://
https://stackoverflow.com/questions/21544803
复制相似问题