如何从 git 中删除代理我尝试了,但仍然显示错误如何解决?

如何从 git 中删除代理我尝试了,但仍然显示错误如何解决?

我的 git 卡住了,无论何时我尝试拉取、推送或克隆,我都会删除代理,但 git 仍然没有做出积极回应。

上次我使用这个命令进行代理:

git config --global http.proxy 172.16.0.2:8080

我尝试以下命令:

git config --global --unset http.proxy
git config --global --unset https.proxy
git config --global --unset core.gitproxy

但是当我克隆存储库或者想要拉取或推送时仍然会收到此响应!

badar:DSA Lab Tasks$ git clone https://github.com/badarshahzad/SEGP_Group10.git
Cloning into 'SEGP_Group10'...
fatal: unable to access 'https://github.com/badarshahzad/SEGP_Group10.git/': Failed to connect to 172.16.0.2 port 8080: Connection timed ou

答案1

使用这些命令后

git config --global --unset http.proxy
git config --global --unset https.proxy
git config --global --unset core.gitproxy

在 --unset 代理之后,这两个命令对我有用

答案2

使用此命令获取所有定义的代理列表,然后用来--unset禁用它们。

git config --global -l

使用以下命令取消设置

git config --global --unset http.proxy

答案3

目标不存在:您可以看到存在的这里。

服务器响应 404 错误:

404 Not Found

The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable. 

404错误来源含义:https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

答案4

您还需要删除以下环境变量:

HTTPS_代理=http://10.55.20.71:128
HTTP_代理=http://10.55.20.71:128

相关内容