我工作的公司最近将代理从网络中删除。
我不能让git忘记代理。它仍然使用旧的代理设置。
我试过:
git config --system --unset https.proxy
git config --system --unset http.proxy
git config --global --unset https.proxy
git config --global --unset http.proxy
也试过了,
git config --global --unset core.gitproxy
git配置-l的输出
user.name=my.name
user.email=my.email.address
user.user=my.name
core.autocrlf=input
我使用的是Manjaro (基于Arch)。我从/etc/环境中删除了代理设置。
唯一起作用的就是做
export https_proxy=""
export http_proxy=""
在发出任何git命令之前。
在bashrc或/etc/profile中没有提供代理设置。
我也不能这么做。
Browser、Maven和其他人工作得很好。任何帮助都将不胜感激。
发布于 2016-12-19 12:10:29
这件事困扰我有一段时间了。我有一种感觉,我一问这个问题,就会找到答案。
事实证明,Arch为代理使用了另一个文件,只有少数应用程序使用该文件。该文件中的代理设置不是系统范围的,这就是为什么在/etc/环境中删除代理之后,我能够使用浏览器和其他应用程序。
有一个文件
/etc/profile.d/proxy.sh
它有代理设置。删除并重新启动修复了问题。
谢谢你的帮助。
发布于 2016-12-19 08:58:40
要做的关键是发出git config --list
(短版本是git config -l
),看看它是否已经配置为git。
如果是的话,请通过~/.gitconfig
、.git/config
(在repo中)、$(prefix)/etc/gitconfig
、$XDG_CONFIG_HOME/git/config
、$GIT_DIR/config
来查看配置的位置并删除它。
如果不是,正如我所猜测的,如果http_proxy
取消了修复,那么通过~/.profile
、~/.bash_profile
、~/.pam_environment
和删除代理定义条目,除了/etc/environment
、/etc/profile
、.bashrc
(您已经做过了)。
https://stackoverflow.com/questions/41217224
复制相似问题