Methods for using HTTP proxies under various code versioning tools

Source: Internet
Author: User

Original: Various SCM tools using HTTP proxy download Source: http://www.linuxeden.com/html/develop/20090723/66951.html

SCM is the abbreviation of software configuration management, Common SCM system has CVS,SVN,HG (Mercurial) and git, etc.

Often there is the need to use SCM to download the source code, especially software developers. But our network environment often forces us to use proxies, either because of speed, or because the direct connection simply doesn't make sense. And the source code is usually a fragmented thousands of tens of thousands of small files, unlike the general software is a single file, a download tool can be done.

1,cvs
CVS is cumbersome to use proxies, and it doesn't seem to be possible to use an HTTP proxy (if I'm wrong to remind you), and the socks agent is pretty hard to find. Fortunately this thing has slowly become yesterday yellow flower, we do not discuss it.

2,svn
SVN is convenient, edit ~/.subversion/servers file can:
[Global]
Http-proxy-host = < agent's IP or domain name >
Http-proxy-port = < proxy port >
Http-proxy-username = < username, if required >
Http-proxy-password = < password, if required >

3,hg
HG is simpler because it uses the HTTP protocol, a command to resolve:
Export http_proxy=http://< username >:< password >@<ip>:< ports >

4,git
Git can use two kinds of protocols, GIT protocol and HTTP, if the latter, then the same way as HG, if it is git, it is troublesome, but it is not unresolved:
Go ahead and download a protocol conversion gadget: HTTP://WWW.MEADOWY.ORG/~GOTOH/SSH/CONNECT.C
Compiled by: Gcc-o Connect connect.c
Place the generated connect in the executable path, such as/usr/bin

Then create a script that uses the proxy, assuming that it is HTTP-PROXY-GW, with the following executable attributes:
#!/bin/sh
# Filename: ~/BIN/HTTP-PROXY-GW
# This script connects to an HTTP proxy using connect.c
Connect-h http://yourproxyaddress:proxyport [email protected]

Finally, configure Git:
git config--global core.gitproxy "HTTP-PROXY-GW for Xxx.yyy"
The xxx.yyy behind is the domain suffix, for example, to download the Linux source code can be set to kernel.org

Methods for using HTTP proxies under various code versioning tools

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.