bower install 遇到错误如下:

bower angular-scenario#>=1.2.*          resolve git://github.com/angular/bower-angular-scenario.git#>=1.2.*
bower bootstrap#~3.1.1                  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 connect to github.com:

这是什么屎问题...因为是在某个很扯的内网里面遇到的,严重怀疑他们的防火墙没事乱堵. 尝试了下curl https://github.com可以.一个解决方法是把bower使用的 git://github.com*** 换成 https://github.com***

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

可以看到配置文件中多了些内容

[url "https://"]
        insteadOf = git://

之后not-cached的内容都会用https下载了...谢天谢地...

Categories: Code

Yu

Ideals are like the stars: we never reach them, but like the mariners of the sea, we chart our course by them.

Leave a Reply

Your email address will not be published.