当我尝试使用git pull origin master
获取请求表单母版时,出现以下代理错误。
fatal: unable to access 'https://github.com/xxx/xxx.git/': Received HTTP code 400 from proxy after CONNECT
我正在使用macOS Mojave,也没有配置任何代理服务器。有人知道如何解决此问题吗?
答案 0 :(得分:1)
由于某些代理配置的出现,要重置所有配置,只需运行rm ~/.gitconfig
并再次启动终端。
答案 1 :(得分:0)
只需运行rm〜/ .gitconfig
也许可以尝试:
git config --global --unset http.proxy
git config --global --unset https.proxy
git config --global --unset core.gitproxy
使用git config -l --show-origin | grep -i代理进行检查,以确保您没有错过任何内容。
重点是:“ {破坏性”比rm ~/.gitconfig
小。
答案 2 :(得分:0)
我刚刚重新启动了PC,它就起作用了。
$ sudo reboot