Proxy issues on git and ssh - Arch linux

949 views Asked by At

The company I work at recently removed proxy from the network.

I am not able make git forget the proxy. It still uses the old proxy settings.

I have tried:

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

Also tried,

git config --global --unset core.gitproxy

Output of git config -l

user.name=my.name
user.email=my.email.address
user.user=my.name
core.autocrlf=input

I am using Manjaro Linux(Arch Linux based). I removed proxy settings from /etc/environment.

The only thing that works is doing

export https_proxy=""
export http_proxy=""

before issuing any git command.

There are no proxy settings given in bashrc or in /etc/profile.

I am not able to ssh either.

Browser, Maven and others work fine. Any help would be much appreciated.

2

There are 2 answers

2
Rabster On BEST ANSWER

This issue had been bugging me for sometime. I had the feeling that the moment I asked it, I would find an answer.

Turns out there is another file used by Arch Linux for proxy that only a few applications use. The proxy settings in this file is not system wide and that is why I was able to use the browser and other applications after removing proxy in /etc/environment.

There is a file

/etc/profile.d/proxy.sh

which had the proxy settings. Deleting that and restarting fixed the problem.

Thank you for your help.

1
eis On

The key thing to do is to issue git config --list (short version is git config -l) to see if it has been configured to git or not.

If it is, go through ~/.gitconfig, .git/config (in repo), $(prefix)/etc/gitconfig, $XDG_CONFIG_HOME/git/config, $GIT_DIR/config to see where the configuration is and remove it.

If it is not, as I would guess for http_proxy unsetting fixing it, go through ~/.profile, ~/.bash_profile, ~/.pam_environment and remove proxy-defining entries, in addition to /etc/environment, /etc/profile, .bashrc you say you already did.