How to configure a HTTP proxy for svn

后端 未结 6 695
猫巷女王i
猫巷女王i 2020-12-01 00:49

I want to check code from the repository http://code.sixapart.com/svn/perlbal/ . I can only access the the repository url by setting a proxy. I guess if I want to get the co

相关标签:
6条回答
  • 2020-12-01 01:08

    Have you seen the FAQ entry What if I'm behind a proxy??

    ... 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.)

    For me this involved uncommenting and setting the following lines:

    #http-proxy-host=my.proxy
    #http-proxy-port=80
    #http-proxy-username=[username]
    #http-proxy-password=[password]
    
    0 讨论(0)
  • 2020-12-01 01:10

    There are two common approaches for this:

    • Specify http-proxy- options in your /etc/.subversion/servers or %APPDATA%\Subversion\servers file,

    • Use --config-option command-line option to specify the same http-proxy- options in single command-line you run. For example,

      svn checkout ^
      --config-option servers:global:http-proxy-host=<PROXY-HOST> ^
      --config-option servers:global:http-proxy-port=<PORT> <REPO-URL> <LWC-DIR> 
      

    If you are on Windows, you can also write http-proxy- options to Windows Registry. It's pretty handy if you need to apply proxy settings in Active Directory environment via Group Policy Objects.

    0 讨论(0)
  • 2020-12-01 01:13

    Most *nixen understand the environment variable 'http_proxy' when performing web requests.

    export http_proxy=http://my-proxy-server.com:8080/
    svn co http://code.sixapart.com/svn/perlball/
    

    should do the trick. Most http libraries check for this (and other) environment variables.

    0 讨论(0)
  • 2020-12-01 01:14

    In TortoiseSVN you can configure the proxy server under Settings=> Network

    0 讨论(0)
  • 2020-12-01 01:15

    In windows 7, you may have to edit this file

    C:\Users\<UserName>\AppData\Roaming\Subversion\servers

    [global]
    http-proxy-host = ip.add.re.ss
    http-proxy-port = 3128
    
    0 讨论(0)
  • 2020-12-01 01:22

    You can find the instructions here. Basically you just add

    [global]
    http-proxy-host = ip.add.re.ss
    http-proxy-port = 3128
    http-proxy-compression = no
    

    to your ~/.subversion/servers file.

    0 讨论(0)
提交回复
热议问题