fatal: unable to access 'https://github.com/xxx/xxx.git/': Failed to connect to 127.0.0.1 port 1080: Connection refused
在使用git pull的时候遇到了如上问题,因为之前因为vscode pull request 无法sign in,我设置了代理,所以出现这种问题把代理取消即可。尝试了普通的方法依旧不能解决,于是决定从源头解决问题。
git config --global --list
这句可以看到当前用户(global)配置,于是我看到自己当时手残的配置
https.https://github.com.proxy=socks5://127.0.0.1:1080
http.proxy=socks5://127.0.0.1:1080
https.proxy=socks5://127.0.0.1:1080
我们想办法把代理从config中删除即可。
然后参考这篇文章
这里我来解释一下,一开始可能不知道config文件的路径,所以可以用
git config --global --edit
进入文件编辑界面,dd,可以批量删除;delete键也可以删除。
ZZ,注意是大写字母,保存并退出。