要達這個功用,走了幾許冤枉路,還被網頁騙。在Eclipse下透過[Windows->Preferences->General->Network Connection]去設置Proxy是沒有效果的。
而是要到%APPDATA% (如我的是C:\Users\Jemmy\AppData\Roaming)目錄的Subversion子目錄找到名為servers的檔案,在該檔找到[global]後,去改底下的設定
[global]
# http-proxy-exceptions = *.exception.com, www.internal-site.org
# http-proxy-host = defaultproxy.whatever.com
# http-proxy-port = 7000
# http-proxy-username = defaultusername
# http-proxy-password = defaultpassword
改http-proxy-host, http-proxy-port為Proxy server的ip和port
[global]
# http-proxy-exceptions = *.exception.com, www.internal-site.org
http-proxy-host = 10.1.2.3
http-proxy-port = 12345
# http-proxy-username = defaultusername
# http-proxy-password = defaultpassword
如此Eclipse就能經proxy存取svn了,而會有以下的失誤:
1.global誤打為globals,後面多個s。不少網頁都寫錯。
2.有不少網頁指Subversion目錄是在C:\Documents and Settings\<em>username</em>\Application Data\下。