Git:如何删除代理

问题描述 投票:15回答:3

我试图推送我的回购但收到错误:

fatal: unable to access 'https://github.com/myrepo.git/': Could not resolve proxy: --list        

我已经更改了代理设置:

git config --global --unset http.proxy  

我的全局配置设置是:

push.default=simple
http.sslverify=false
url.https://.insteadof=git://
credential.helper=cache --timeout=3600

但仍然得到这个错误?我怎么解决这个问题?

git github
3个回答
46
投票

检查您的环境:

echo $http_proxy
echo $https_proxy
echo $HTTPS_PROXY
echo $HTTP_PROXY

并使用export http_proxy=删除

或者检查https代理

git config --global --unset https.proxy

或者你在本地配置中有代理吗?

git config --unset http.proxy
git config --unset https.proxy

3
投票

你有没有在这里检查你的代理?

git config --global --list

要么

git config --local --list

0
投票

检查你是否有可以定义代理的环境变量(由curl选取,即使git config不再包含任何代理设置):

HTTP_PROXY
HTTPS_PROXY
© www.soinside.com 2019 - 2024. All rights reserved.