问题描述
github桌面版无法pull代码,直接使用命令也无法pull代码,报错如下
github fatal: unable to access ... SOCKS5 read timeout
或者
fatal: unable to access "...": Failed to connect to 127.0.0.1 port 1088: Connection refused
-
github desktop找不到是设置了代理或者查看代理的地方
-
进入项目文件下git配置信息里面没有设置代理
-
使用如下代码查看代理,没有任何显示
git config --global --get http.proxy
git config --global --get https.proxy
- 使用如下代码取消代理无效
git config --global --unset http.proxy
git config --global --unset https.proxy
成功解决方式
访达切换到用户目录,Command+Shift+. 显示隐藏文件,找到.gitconfig文件,以文本方式打开,找到设置代理端口为1088那一行删除。再一次命令行pull代码,成功。去github desktop更新代码,成功。
总结
git config --global配置的信息报错在~/.gitconfig文件中,如果pull代码出问题,也需要考虑去这个地方找找。