If your Linux host is behind a corporate proxy, and you are trying to access a svn repository located outside the corporate network, you will need to configure proxy settings in svn, so that svn traffic can traverse the proxy properly.
While most Linux applications that require network access respect http_proxy environment variable, subversion ignores http_proxy variable. Thus, in order to use svn behind proxy, you instead need to rely on svn-specific configuration file.
In subversion, you can find svn configuration files in the following two different locations: /etc/subversion, and ~/.subversion. The former stores "system-wide" svn configurations, while the latter contains "user-specific" svn configurations that override system-wide default settings.
In order to allow you to use svn behind proxy, edit ~/.subversion/servers as follows.
[global] http-proxy-host = proxy.com http-proxy-port = 8000 http-proxy-username = user http-proxy-password = pass http-proxy-exceptions = *.domain.com
If you would like to configure a http proxy for svn system-widely, edit /etc/subversion/servers similarly.
One thing to clarify is that depending on the filtering rules of your proxy, you may not be able to use all available transport protocols for svn (e.g., http://, https://, svn://). If the svn repository to access only supports svn protocol (i.e., svn://), and your proxy blocks the port number (e.g., 3690) used by svn protocol, you cannot access the repository even with the above proxy settings, unless you create a separate tunnel through the proxy.
Subscribe to Xmodulo
Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.
Did you find this tutorial helpful? Then please be generous and support Xmodulo!
Latest posts by Dan Nanni (see all)
- How to set up Apt caching server on Ubuntu or Debian - February 7, 2016
- How to monitor OpenFlow messages with packet sniffer - February 2, 2016
- How to search multiple pdf documents for words on Linux - January 13, 2016