How to Use git proxy

Source: Internet
Author: User
Tags how to use git

Sometimes, you must use a proxy to access the external network. In this case, you need to use git to download the code. What should I do? The answer is tsocks.

Http://sourceforge.net/projects/tsocks/files/tsocks/1.8%20beta%205/:

Tar xzvfTsockS-1.8beta5.tar.gz

CDTsockS-1.8

./Configure-Prefix =/usr; Make; make install

 

The next step is to modify the/etc/tsocks. conf configuration file and configure it according to the actual network conditions.

Server =... # Your local proxy server

Server_type = 5 # socks version, use 5 as default

Server_port = 1080 # socks proxy Port

Local = 10.0.0.0/255.0.0.0 # internal network; will not use proxy when accessing this Subnet

After the configuration, you can use git to download the file:

Tsocks git clone git: // gitorious.org/vaapi/mplayer.git mplayer

 

However, if you use HTTP, you only need to configure the proxy before downloading it.

Export http_proxy = server_address: server_port

Git clone http://gitorious.org/vaapi/mplayer.git mplayer

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.