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