如何解决致命问题:无法访问,CONNECT后从代理接收到HTTP代码400

时间:2019-04-01 09:18:56

标签: git github

当我尝试使用git pull origin master获取请求表单母版时,出现以下代理错误。

fatal: unable to access 'https://github.com/xxx/xxx.git/': Received HTTP code 400 from proxy after CONNECT

我正在使用macOS Mojave,也没有配置任何代理服务器。有人知道如何解决此问题吗?

3 个答案:

答案 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