I work on a Linux system in a Windows environment. To authenticate with a NT proxy server I had setup cntlm
and configured system programs to use it via setting http_proxy
environment variable in the /etc/environment
file.
Now I want to remove this proxy setting and have the programs connect directly.
So I unset the system environment variables:
unset http_proxy
unset HTTP_PROXY
Check ~/.gitconfig
to ensure that there are no proxy entries.
Explicitly instruct git
not to use any proxies:
git config --global --unset http.proxy
git config --global --unset https.proxy
Verify that no proxy is configured:
git config --system --get https.proxy
git config --global --get https.proxy
git config --system --get http.proxy
git config --global --get http.proxy
And then push to a remote repo:
git push
But git
still tries to connect via proxy:
fatal: unable to access 'https://[email protected]/xxx.git/': Failed to connect to 127.0.0.1 port 3128: Connection refused
Why won't it let go off cntlm
?
cat ~/.
this will list all the files.cat ~/.gitconfig
this will open the contents of file.If you find any proxies there remove it like
[http] proxy = http://127.0.0.1:3128
You can remove it by using nano ~/.gitconfig
command.
Now this command will work.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
ALSO REMEMBER to remove all the proxies like
unset http_proxy="http_proxy"
unset https_proxy=$http_proxy
unset ftp_proxy=$http_proxy
unset rsync_proxy=$http_proxy
unset HTTP_PROXY=$http_proxy
unset HTTPS_PROXY=$http_proxy
unset FTP_PROXY=$http_proxy
unset RSYNC_PROXY=$http_proxy
Remember to remove proxies from system preferences network and proxies uncheck all the check boxes now try to do.
The easiest check to do is:
env|grep -i proxy
The OP confirms:
I thought I had removed
proxy
by unsethttp_proxy
.
But there is a different environment variable for HTTPS which needs to be unset separately. Runningenv|grep -i proxy
revealed that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With