错误提示
fatal: unable to access 'https://gitee.com/xxxxx.got/':
Received HTTPcode 404 from proxy after CONNECT
问题原因
设置了代理导致git项目无法拉取
解决办法
找到.gitconfig文件路径 :cmd: where .gitconfig
(一)设置代理
(1)命令方式设置http代理:git config --global http.proxy xxxx
(2)命令方式设置https代理:git config --global https.proxy xxxx
(3)命令方式设置core代理:git config --global core.gitproxy xxxx
(4)配置文件方式设置代理:找到.gitconfig文件,添加如下内容:
[http]
proxy = xxx
[https]
proxy = xxx
[core]
gitproxy = xxx
(二)取消代理
(1)命令方式:
git config --global --unset http.proxy
git config --global --unset https.proxy
git config --global --unset core.gitproxy
(2)文件方式:找到.gitconfig文件,直接将http段下的proxy区块删除,https段下的proxy区块删除,core段下的gitproxy区块删除,删除后效果如下所示:
[http]
[https]
[core]
本文介绍了解决因设置代理而导致的Git项目无法拉取的问题。提供了通过命令行及编辑配置文件两种方式来设置或取消代理的方法。



7091

被折叠的 条评论
为什么被折叠?



