Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot do git-svn fetch behind proxy

Tags:

git

svn

git-svn

I'm trying to mirror a svn repo using git-svn.

I'm doing

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, http.proxy (the global one in git) and $HOME/AppData/Roaming/Subversion/servers to the correct proxy.

Doing svn checkout [repo adress] in a shell works. Doing wget [repo adress] in a shell works. But not 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... :/

like image 402
bjarven Avatar asked Feb 26 '13 17:02

bjarven


2 Answers

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 C:\Users\MYUSER\AppData\Roaming\Subversion\servers, but git-svn uses ~/.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.

like image 128
janos Avatar answered Oct 05 '22 23:10

janos


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...

like image 21
Fredrik Pihl Avatar answered Oct 06 '22 01:10

Fredrik Pihl