在SUBVERSION中使用代理

给SVN设置代理的方法!
在C:\Documents and Settings\current user\Application Data\Subversion的server配置文件下找到[global]节点
然后添加
http-proxy-host = 172.100.1.28  代理ip
http-proxy-port = 8080   代理端口
http-proxy-username = haoxw   svn用户名

http-proxy-password = haoxw12   svn密码

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The Subversion client can go through a proxy, if you configure it to do so. First, edit your "servers" configuration file to indicate which proxy to use. The files location depends on your operating system. On Linux or Unix it is located in the directory "~/.subversion". On Windows it is in "%APPDATA%\Subversion". (Try "echo %APPDATA%", note this is a hidden directory.)

There are comments in the file explaining what to do. If you don't have that file, get the latest Subversion client and run any command; this will cause the configuration directory and template files to be created.

Older versions of Subversion, including the 0.14.3 bootstrap tarball, use the file ~/.subversion/proxies to define the proxy settings. This file is ignored by the current version of Subversion.

Next, you need to make sure the proxy server itself supports all the HTTP methods Subversion uses. Some proxy servers do not support these methods by default: PROPFIND, REPORT, MERGE, MKACTIVITY, CHECKOUT. In general, solving this depends on the particular proxy software. For Squid, the config option is

   #  TAG: extension_methods
   #  Squid only knows about standardized HTTP request methods.
# You can add up to 20 additional "extension" methods here.
#
# Default:
# none
extension_methods REPORT MERGE MKACTIVITY CHECKOUT

(Squid 2.4 and later already knows about PROPFIND.)

See also "What are all the HTTP methods Subversion uses?" for advice on additional HTTP methods to allow through your proxy.

If it's difficult or impossible to get the proxy to allow Subversion traffic, but you want to check out the Subversion sources, you may be able to go around the proxy. Some proxies that filter port 80 nevertheless allow anything on port 81. For this reason, the svn.collab.net repository server listens on port 81 as well as on port 80. Try:

   svn checkout http://svn.collab.net:81/repos/svn/trunk subversion

and maybe the proxy will let you through. Another strategy is to attempt the checkout over SSL, which many proxies allow:

   svn checkout https://svn.collab.net/repos/svn/trunk subversion

Of course, your svn client will have to have been built with ssl support; just pass --with-ssl to subversion's ./configure script. You can check to see whether the 'https' scheme is supported by running svn --version.

http://student.mblogger.cn/hexing/posts/168733.aspx

 


posted @ 2009-07-14 21:17  Devilmsg  阅读(840)  评论(0编辑  收藏  举报