
If your Subversion (SVN) client is behind an Internet proxy, you may experience connection issues when trying to checkout, update, or commit changes. This guide explains how to configure SVN to work through a proxy server on both Windows and Linux systems.
1. Identify Your Proxy Server Details
Before configuring SVN, gather the following information from your network administrator: Proxy Server Address (e.g.,
proxy.company.com
) Proxy Port (e.g.,
8080
) Username & Password (if authentication is required)
2. Configure SVN Proxy Settings
Method 1: Edit SVN Configuration File
SVN uses a configuration file (servers
) where you can set proxy details.
Windows
Locate the SVN config file:
- Open
C:\Users\YourUserName\AppData\Roaming\Subversion\servers
in Notepad or any text editor. - (For older Windows versions:
C:\Documents and Settings\YourUserName\Application Data\Subversion\servers
)
Edit the
[global]
section:
[global]
http-proxy-host = proxy.company.com
http-proxy-port = 8080
http-proxy-username = your_username
http-proxy-password = your_password
(Replace proxy.company.com
, 8080
, your_username
, and your_password
with actual values.)
Save and close the file.
Linux/macOS
Open the SVN config file:
nano ~/.subversion/servers
Edit the
[global]
section:
[global]
http-proxy-host = proxy.company.com
http-proxy-port = 8080
http-proxy-username = your_username
http-proxy-password = your_password
Save the file (
Ctrl + X
, then Y
, then Enter
).
Now, your SVN client should work through the proxy!
3. Configure SVN to Use an Environment Proxy (Alternative Method)
If your proxy settings change frequently, use environment variables instead of modifying the SVN configuration file.
Windows (CMD/Powershell)
Open Command Prompt (
Win + R
→ type cmd
) Set environment variables:
set http_proxy=http://proxy.company.com:8080
set https_proxy=https://proxy.company.com:8080
If authentication is required:
set http_proxy=http://your_username:your_password@proxy.company.com:8080
Now, run your SVN commands:
svn checkout http://svn.example.com/repo
For persistent settings, add these lines to
System Properties → Environment Variables
in Windows.
Linux/macOS (Bash Terminal)
Open a terminal
Set the proxy variables:
export http_proxy=http://proxy.company.com:8080
export https_proxy=https://proxy.company.com:8080
If authentication is required:
export http_proxy=http://your_username:your_password@proxy.company.com:8080
Run your SVN commands:
svn update
For persistent settings, add these lines to your
~/.bashrc
or ~/.bash_profile
file.
4. Troubleshooting Common Issues
“Could not connect to server” Error
Check if the proxy settings are correct (
ping proxy.company.com
). Verify if your network allows HTTP/HTTPS traffic over SVN ports (80, 443).
Use
telnet
to check connectivity:
telnet proxy.company.com 8080
SVN Command Fails with Authentication Errors
Ensure your username & password are correct.
If special characters (
@
, :
, etc.) are in the password, encode them in URL format:
- Example:
p@ssword
→p%40ssword
5. Conclusion
By configuring the SVN proxy settings, you can successfully access Subversion repositories from behind an internet proxy.
Would you like help with SVN automation, troubleshooting, or setting up a batch script for SVN sync? Let me know!
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND