用tsocks使用代理来clone外网的git repository

以前写过一篇关于tsocks的博客,讲解了一下tsocks的使用,这次在工作中呢,其他需要,所以又用英文写了一下。
我在网易博客中关于tsocks的博文在:
用英文写了一点tsocks用于git clone的方法如下:

How to clone external git repository using tsocks

What's the background?
To git clone something like git://external_network/temp.git in $my_company network will be blocked by our IT policy. This BKM will help you to resolve this issue using tsocks.
Note: The following steps on using tsocks is based on a RHEL6.x system and tocks-1.8-x. There should be some similar configuration with OSes or tsocks in different versions.

How to use tsocks to help your git-clone?

1. '''install tsocks: '''
• download this RPM for RHEL6.x attachment:tsocks-1.8-7.beta5.2.el6.rf.x86_64.rpm
• (or download source code from: http://sourceforge.net/projects/tsocks/files/tsocks/1.8%20beta%205/, and compile it.)

2. add/modify the config file '''/etc/tsocks.conf'''

Note: make sure the proxy server is in your local network. (Maybe it's the proxy server in your Intel site.)

3. use git clone with tsocks:

git clone a http repository
If your repository is using HTTP (something like "http://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git"), you only need to export 'http_proxy' environment variable before cloning.
for example:

master

Stay hungry, stay foolish.

发表评论

邮箱地址不会被公开。 必填项已用*标注

*