Still getting 407 from Proxy after CONNECT

6

2

I'm in a corporate network that access to the Internet through a proxy. For instance I have connection to the Internet through the browsers (Firefox, Chrome ...)

The problem is that when I’m trying to connect from the Terminal and set the export configuration for both (http and https) like this:

export http_proxy=http://user:password@ip:port

And I try to make a git clone like this:

git clone https://github.com/octocat/Spoon-Knife

I get:

Cloning into 'Spoon-Knife'...

fatal: unable to access 'https://github.com/octocat/Spoon-Knife/': Received HTTP code 407 from proxy after CONNECT

Some things to note

  • I try to access using other commands like curl curl www.google.com and still get

Error Code: 407 Proxy Authentication Required. The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. (12209)

  • Like I say my Internet connection in the browser works perfectly well. So isn’t a connection issue.
  • The only special character that my password has is a * and I escaped it properly using %2A.

Javier Cadiz

Posted 2014-06-12T16:40:07.340

Reputation: 161

Answers

3

Are you sure your proxy is using basic auth? It is likely to be NTLM, being ISA.

Not 100% on how git handles proxies, and auth thereof, but if we can get curl working we will have half a chance of working back to making git behave.

Can you try using ntlm and, if that doesn't work, negotiate on the commandline with curl - check the man page here, but you'll need

--proxy-ntlm

and

-U user:password

Be careful with escaping your "*" in your pw (or change it, at least temporarily to make troubleshooting easier)

If it's NTLM, you're out of luck with git I think - but a question over on stack overflow suggests an intermediate proxy on your local box - CNTLM - which I have used to NTLM wrap other software that can't do auth.

Tom Newton

Posted 2014-06-12T16:40:07.340

Reputation: 231