2

I was using git version 1.7.1(default one) on CentOS 6.8. Set the proxy like:

git config --global https.proxy https://ddddd:sssss@example.com:8080
git config --global http.proxy http://ddddd:sssss@example.com:8080

It works like a charm. But some newly added features are not supported. That's why I upgraded git to the latest version 2.9.3. Then the proxy is broken. I tried to reset the proxy and went through all the ways I searched from google without success.

I always get this error: "Received HTTP code 407 from proxy after CONNECT"

$ git clone https://py@gitlab.com/py/rtb.git
Cloning into 'rtb'...
fatal: unable to access 'https://py@gitlab.com/py/rtb.git/': Received HTTP code 407 from proxy after CONNECT
$

Do you guys have any idea why the new version git is broken on proxy?

Thanks in advance.

pellucid
  • 251
  • 1
  • 2
  • 13

2 Answers2

0

I encountered this problem. You must disable the global proxy settings in the OS /etc/profile. Comment out the following lines

#MY_PROXY_URL="http://proxy:8080/"
#HTTP_PROXY=$MY_PROXY_URL
#HTTPS_PROXY=$MY_PROXY_URL
#FTP_PROXY=$MY_PROXY_URL
#http_proxy=$MY_PROXY_URL
#https_proxy=$MY_PROXY_URL
#ftp_proxy=$MY_PROXY_URL
#export HTTP_PROXY HTTPS_PROXY FTP_PROXY http_proxy https_proxy ftp_proxy

Create the file ~/.gitconfig and add lines

[http]
proxyAuthMethod = basic
proxy = http://user:pass@proxy:8080
0

It's because of proxy credentials issue, Please check proxy credentials once again and try!