我直接连到代理服务器上 git clone 很快,但是在本地设置了 http.proxy 以后一点都没加速,这个怎么破
![]() | 1 wangsongyan 2020-03-15 23:00:40 +08:00 via iPhone https_proxy |
2 lmoon 2020-03-15 23:01:52 +08:00 via Android git:// 开头的协议要另外设置代理 |
![]() | 3 ThanksSirAlex OP @lmoon 但是我用的是 https,没有 git:// |
![]() | 4 ThanksSirAlex OP ![]() @wangsongyan 这个我也设置了,没用 |
![]() | 5 jimliang 2020-03-15 23:05:58 +08:00 http.proxy https.proxy 都设置了没 |
![]() | 6 QingStone 2020-03-16 01:35:57 +08:00 via Android 是 Windows 平台吗? |
7 有个别的办法 用 gitee 中转下 |
![]() | 8 royzheng 2020-03-16 02:00:36 +08:00 ![]() 如果你非 windows 平台的话 在~/.ssh/config 里设置下 Host github.com HOSTNAME github.com User git ProxyCommand nc -X 5 -x 127.0.0.1:1080 %h %p 1080 端口换成你本地的 ss client socks 端口 |
![]() | 9 learningman 2020-03-16 02:30:47 +08:00 via Android @VDarker 有 submodule 就废了 |
![]() | 10 kumiko 2020-03-16 08:48:08 +08:00 via Android 我用 hosts 大法,懒得再装别的东西 |
![]() | 11 lniwn 2020-03-16 09:11:08 +08:00 proxychains4 |
![]() | 12 ysc3839 2020-03-16 13:42:14 +08:00 via Android 还要设置 https.proxy,不然 https 协议不会走代理。 |
![]() | 13 ewex 2020-03-16 21:51:25 +08:00 ![]() Clone with HTTPS git config --global http.proxy http://127.0.0.1:1080 git config --global http.proxy socks5://127.0.0.1:1080 git config --global http.proxy socks5h://127.0.0.1:1080 飞机代理,以上 3 种任选 1 种,我自己用的第 3 种。 另外没有 https.proxy 设置,不要听信上面有些人说的。 Arch Linux、CentOS 8 实测没问题,其他发行版应该也没问题。 Clone with SSH echo "Host github.com" >> ~/.ssh/config echo "ProxyCommand nc -X 5 -x 127.0.0.1:1080 %h %p" >> ~/.ssh/config 上面的 IP、端口、域名换成对应正确的就好 |