我正在使用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
我尝试使用以下解决方案来解决第一个错误 - 我从这个搜索结果中找到的:
git config --global url."https://".insteadOf git://
然而,这并不起作用,那个页面上找到的任何其他解决方案也都无效。对于第二个错误的解决方案搜索结果表明,如果您在公司网络/防火墙后面工作,则设置代理服务器的用户名/密码将解决此问题。然而,我没有使用代理服务器,因为我在家用个人电脑/网络(Windows 7 x64)。谢谢!编辑:附带错误信息的命令行窗口:![enter image description here](https://istack.dev59.com/ISTAh.webp)
npm
和https相关的类似问题,通过使用git config --global url."git@github.com:".insteadOf "https://github.com"
解决了该问题。 - grabantot