
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
1οΈβ£ 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
)
2οΈβ£ 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.)
3οΈβ£ Save and close the file.
Linux/macOS
1οΈβ£ Open the SVN config file:
nano ~/.subversion/servers
2οΈβ£ 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
3οΈβ£ 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)
1οΈβ£ Open Command Prompt (Win + R
β type cmd
)
2οΈβ£ Set environment variables:
set http_proxy=http://proxy.company.com:8080
set https_proxy=https://proxy.company.com:8080
3οΈβ£ If authentication is required:
set http_proxy=http://your_username:your_password@proxy.company.com:8080
4οΈβ£ 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)
1οΈβ£ Open a terminal
2οΈβ£ Set the proxy variables:
export http_proxy=http://proxy.company.com:8080
export https_proxy=https://proxy.company.com:8080
3οΈβ£ If authentication is required:
export http_proxy=http://your_username:your_password@proxy.company.com:8080
4οΈβ£ 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.
Do you want to learn Quantum Computing?
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