
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
Code language: PHP (php)
(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
Code language: JavaScript (javascript)
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
Code language: PHP (php)
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
Code language: JavaScript (javascript)
3️⃣ If authentication is required:
set http_proxy=http://your_username:your_password@proxy.company.com:8080
Code language: JavaScript (javascript)
4️⃣ Now, run your SVN commands:
svn checkout http://svn.example.com/repo
Code language: JavaScript (javascript)
💡 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
Code language: JavaScript (javascript)
3️⃣ If authentication is required:
export http_proxy=http://your_username:your_password@proxy.company.com:8080
Code language: JavaScript (javascript)
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
Code language: CSS (css)
🔹 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 have worked at Cotocus. I share tech blog 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 TrueReviewNow , 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 WIZBRAND