git遇到错误Failed to connect to 127.0.0.1 port 1080: Connection refused

6,239 阅读1分钟

 

今天在git 上面进行git pull 和 git push,都出现以上错误。

于是我上网找解决方法,有几种方法,总结如下:

①因为设置了代理,所以要取消代理:

查询是否使用代理:git config --global http.proxy         
                 git config --global https.proxy 

如果有,则取消git config --global --unset http.proxy

               git config --global --unset https.proxy

②:找到.git目录下的config文件,把里面的http内容删掉即可,

然后再执行git pull 和git push 操作