Cannot do git-svn fetch behind proxy
git svn clone http://worldwind31.arc.nasa.gov/svn/trunk/WorldWind
And I’m getting
Initialized empty Git repository in f:/gstest/WorldWind/.git/ RA layer request failed: PROPFIND request failed on '/svn/trunk/WorldWind': PROPFIND of '/svn/trunk/WorldWind': could not connect to server (http://worldwind31.arc.nasa.gov) at /usr/lib/perl5/site_perl/Git/SVN.pm line 148
If I do the same on another computer that isn’t within the proxy it’s ok.
I’m on a win7, and I’ve set
http.proxy (the global one in git) and
$HOME/AppData/Roaming/Subversion/servers to the correct proxy.
svn checkout [repo adress] in a shell works.
wget [repo adress] in a shell works.
git svn clone [repo adress]
Any ideas? Most of the questions I’ve found on this points me to the
Subversion/servers file, but now I’ve edited that one and the problem is still there… :/
5 Solutions collect form web for “Cannot do git-svn fetch behind proxy”
I had the exact same problem.
And the solution is finding the correct Subversion configuration directory. At least in my case the native
svn.exe uses the file
~/.subversion/servers. And I mean this path
~/.subversion/servers in the Git Bash shell, where
~ is expanded to the right location. Edit
~/.subversion/servers the same way as the other one used by
svn.exe and then
git svn clone should work.
In short, the key is finding the right configuration file to edit, as you may have multiple of them in Windows.
To get svn to work behind a proxy on linux, update the file
~/.subversion/servers with the proxy details.
[global] # http-proxy-exceptions = *.exception.com, www.internal-site.org http-proxy-host = YOURPROXY.com http-proxy-port = YOURPORT # http-proxy-username = defaultusername # http-proxy-password = defaultpassword # http-compression = no # http-auth-types = basic;digest;negotiate # No http-timeout, so just use the builtin default. # No neon-debug-mask, so neon debugging is disabled. # ssl-authority-files = /path/to/CAcert.pem;/path/to/CAcert2.pem
I guess there’s a similar configuration on windows…
Usually, the environment variables alone:
are enough for git or git-svn to work properly.
But what gets me is the exact url to use.
HTTP_PROXY=wwww.myproxy.company:8080won’t work, but
Use the same for
HTTPS_PROXY, meaning the same http address (I tried first putting an https url for the
HTTPS_PROXY, but that is not how it works)
Of course, if you need to authenticate, you can (at least for testing purposes) add your login/passname in it:
And it helps setting the
NO_PROXY one too:
So the main point behind this answer is “double check the exact url you are using” (and test it with a simple
curl http://www.google.com, or with
wget, either from the msysgit package or from
Gnu On Windows)
Have a look in C:\Users\YOU\.subversion\servers for the settings. You’re looking for something inside this file like…
[global] # http-proxy-exceptions = *.exception.com, www.internal-site.org http-proxy-host = 127.0.0.1 http-proxy-port = 3128
… These settings are for CNTLM. Uncomment the lines I have uncommented above & put your own details in. There are fields for passwords etc. Fixed it for me getting stuff from Sourceforge. Yeah, Sourceforge is still there.
Also, CNTLM is great for getting through NTLM, forefront etc. Run Fiddler2 & set the rules to “Automatically Authenticate” to true to pick up any auth that CNTLM misses. Chrome updates are one thing that Fiddler fixes for me.
For me the solution was just to change url in config.
Because I wasn’t able to access the existing one.
To check I simply accessed the repo url using my browser.
In case of using forbidden url I got ‘403 Forbidden’.