git时 Failed to connect to 127.0.0.1 port 1080: Connection refused

在公司换了一台电脑之后发现git clone 和 npm install都失败,报错为

fatal: unable to access 'https://github.com/netease-im/NIM_PC_UIKit/': Failed to connect to 127.0.0.1 port 1080: Connection refused 

产生原因:本地使用了端口代理,导致连接失败

解决办法:在本机全局搜索 gitconfig

 

 打开文件,删除有关proxy的所有行,只删除与 proxy 有关的,其他的不用管,再次git clone 和 npm install就没有问题了

posted @ 2019-12-18 10:11  三天打鱼郎  阅读(2490)  评论(0编辑  收藏  举报