编译的时候脚本自动 clone 网上的源代码, http 方式和 wget 方式的都好设置代理,但是 git://方式的要如何设置?卡在 git clone git://几个小时了。 另外再说明一下,如果是手动clone单个源代码,直接把git://改为http://就好了,编译的时候自动调用脚本的没法改啊。
编译的时候脚本自动 clone 网上的源代码, http 方式和 wget 方式的都好设置代理,但是 git://方式的要如何设置?卡在 git clone git://几个小时了。 另外再说明一下,如果是手动clone单个源代码,直接把git://改为http://就好了,编译的时候自动调用脚本的没法改啊。
1
clarkok Jan 7, 2017 via Android
可以用环境变量 socket_proxy 设置一个 socket 代理
|
2
xhcnb Jan 7, 2017 via Android
使用 proxychains
|
3
ericls Jan 7, 2017 via iPhone
git 走的 ssh 直接设置 ssh 的 proxy 就好
|
4
binux Jan 7, 2017 via Android
.SSH/config
|
5
liuzuo Jan 7, 2017 via Android
Nginx tcp 代理
|
6
flintthuang OP 谢谢大家的回复,我找到一个脚本解决问题了
https://github.com/cms-sw/cms-git-tools/blob/master/git-proxy |
7
flintthuang OP @flintthuang
然后修改.gitconfig 文件加两个配置 git config --global core.gitproxy "git-proxy" git config --global socks.proxy "yourip:yourport" |
8
rogerchen Jan 7, 2017 ssh 模式就去 .ssh/config 里边写
Host github.com User git ProxyCommand nc -x yourip:yourport %h %p https 模式就 git config --global http.proxy "yourip:yourport" |
9
q397064399 Jan 7, 2017
proxychains +n
|
11
xmgit Jan 7, 2017
|
12
kimown Jan 7, 2017 via Android
proxychains-ng 这是最新版。
|
13
julyclyde Jan 7, 2017
上面回答 ssh 的几位,如果是在中学的话应该已经以审题不仔细掉进考试的坑里了
|
15
billlee Jan 7, 2017
core.gitproxy
|
16
nilai Jan 7, 2017
proxychains +1
|
17
ynyounuo Jan 7, 2017
善用「 insteadOf 」
|
18
cherrychen Jan 7, 2017 via iPhone
|
19
wweir Jan 7, 2017
export ALL_PROXY=socks5://127.0.0.1:1080
亲测,好使 |
20
mritd Jan 8, 2017 via iPhone
上面嘲笑 ssh 的小学同学,请尝试修改 ssh 代理然后 git clone git://xxx.git
|