QuickTip: Setting HTTP Proxy for SVN

Posted on Sunday, January 25, 2009


For setting the HTTP proxy for SVN the regular setting of http_proxy environment variable would not work.  i.e.

export http_proxy=http://my-proxy-server.com:8080/ would not work.

There is a “servers” file in svn which is present at the following location

Win : C:\Documents and Settings\hazrativ\Application Data\Subversion\servers

Linux: /etc/subversion/servers

Here you need to set the proxy server and port settings so that command line SVN can access the external world form the proxy. Uncomment and change the lines necessary

# http-proxy-exceptions = *.exception.com, http://www.internal-site.org
http-proxy-host = myproxy.us.com
http-proxy-port = 8080

# 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

If you get something like

svn: C:\Documents and Settings\hazrativ\Application Data\Subversion\servers:73:
Option expected

then it means that you have a space at the start of the property which you have un-commented. Make sure that there is no space in the beginning of the property in the servers file.

About these ads