bower报错:未能连接到github.com端口1080:超时和一些其他错误

报错1:fatal: unable to access 'https://github.com/xxx/xxxx.git/': Failed to connect to github.com port 1080: Timed out:连接超时

解决办法:打开终端:git config --global url."https://".insteadOf git://

 本来搜了一下网上给的答案是这样的:$ git config --global http.proxy git://github.com/ 但是这样写了还是报错 于是我就换成了git config --global url."https://".insteadOf git:// 于是就有了下边这个错 ↓

报错2:fatal: unable to access 'https://github.com/xxx/xxx.git/': Empty reply from server:来自服务器的空答复

解决办法:把https换成 git:git config --global url."git://".insteadOf git:// (换个通道就好了,这个搜一下就有答案。)

报错3 git报错:warning: http.proxy has multiple values :http.proxy有多个值

解决办法:

git config --system (or --global or --local) --unset http.proxy

或者

git config --system (or --global or --local) --unset-all http.proxy
git config -l 得到所有 http.proxy 条目

报错4 如果bower报错:This Bower version is deprecated. Please update it: npm install -g bower. The new registry address is https://registry.bower.io(今天刚接触,什么都不会,这是配置文件少东西)

解决方法:在 bower.json下有一个.bowerrc文件 打开修改:

{
"directory": "wwwroot/lib",
"registry": "https://registry.bower.io",
"strict-ssl": false
}

原来只有:"directory": "wwwroot/lib" 这一行。

目前我只遇到这些错误。

参考:https://stackoverflow.com/questions/6529433/window-git-git-config-global-http-proxy-warning-http-proxy-has-multiple-val

https://blog.csdn.net/greenqingqingws/article/details/11808745

http://www.cnblogs.com/powertoolsteam/p/grunt-and-bower-in-visual-studio-2015.html  ——安装和使用bower。

还有一些其他博客没有记住。谢谢

posted @ 2019-04-17 16:10  四个春天  阅读(907)  评论(0编辑  收藏  举报