I'm trying to use Git through a proxy. I've tried setting parameters 'git config --global' in a lot of ways but always without success when cloning repositories.
I did:
git config --global http.proxy http://DOMAIN\\\username:[email protected]:8080
git config --global http.sslverify false
git clone http://github.com/project/project.git
And I got:
$ git clone http://github.com/project/project.git folder
Cloning into 'folder'...
error: The requested URL returned error: 407 while accessing http://github.com/project/project.git/info/refs
fatal: HTTP request failed
So, how can I debug this or enable logging in Git to discover why I'm still getting the 407 error? Is there some parameter in Git to verbosely show what is happening to catch the right point where the error is occurring?
If you are behind a firewall, you will need to configure your firewall settings to allow access to the proxy server. Once you have the correct proxy settings, the 407 Proxy Authentication Required error should be fixed.
The HTTP 407 Proxy Authentication Required client error status response code indicates that the request has not been applied because it lacks valid authentication credentials for a proxy server that is between the browser and the server that can access the requested resource.
I had a similar problem trying to git push
from a Git Bash client in Windows.
I fixed it just by browsing to the site using Chrome.
Then I came back to Git Bash and it worked right away
For clarity, my GIT repository URL looks like http://[email protected]/myproject.git
And I browsed to http://www.cloudforge.com
My understanding is that it forces the proxy to resolve this domain.
You can enable trace logging to get more information about what Git is doing. Following is an example:
GIT_TRACE=$HOME/trace.log git co master
You must use absolute paths if you want to send output to a file. Otherwise, use true or 1 to send output to standard error; e.g. GIT_TRACE=1
.
If you're already behind a proxy and getting this error, you will have to clear http.proxy
and https.proxy
:
git config --global --unset http.proxy
git config --global --unset https.proxy
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