justin2018

ssh: git clone 加速下载

  •  
  •   justin2018 · Dec 8, 2020 · 1640 views
    This topic created in 2166 days ago, the information mentioned may be changed or developed.

    这速度 理论上 clone 应该很快的 结果 clone 4kb/s 晕死了

    RTECRA3

    来源: https://gist.github.com/chuyik/02d0d37a49edc162546441092efae6a1

    修改 ~/.ssh/config 文件(不存在则新建):
    
    # 必须是 github.com
    Host github.com
       HostName github.com
       User git
       # 走 HTTP 代理 我使用这个会报错 不知道为啥 端口改成你自己的
       # ProxyCommand socat - PROXY:127.0.0.1:%h:%p,proxyport=8080
       # 走 socks5 代理 这个 ok 端口改成你自己的
       # ProxyCommand nc -v -x 127.0.0.1:1080 %h %p
    

    下载速度嗖嗖嗖的~

    VNHT60l

    9 replies  •  2020-12-10 09:34:39 +08:00
    no1xsyzy
    no1xsyzy
    Dec 8, 2020
    1
    ssh 链接一般不能走 HTTP 代理吧……
    omph
    omph
    Dec 9, 2020
    2
    有时用 gitee,支持导入 github 项目
    dingwen07
    dingwen07
    Dec 9, 2020 via iPhone
    3
    TAP 网卡解忧愁
    justin2018
    justin2018
    OP
    Dec 9, 2020
    4
    @no1xsyzy 嗯 之前用的 http 失败了 后来用的 socks5
    daiqiangbudainiu
    daiqiangbudainiu
    Dec 9, 2020
    5
    我一直用的 https git clone,直接环境变量配代理就行了
    tiramice
    tiramice
    Dec 9, 2020
    6
    proxychains4 git clone
    justin2018
    justin2018
    OP
    Dec 9, 2020
    7
    @tiramice 这个真不错 ~~ 好多都可以代理~ 厉害
    JimmyTinsley
    JimmyTinsley
    Dec 9, 2020
    8
    proxychains +1
    Reficul
    Reficul
    Dec 10, 2020
    9
    @no1xsyzy http 代理也可以走 TCP 流量的,CONNECTION 方法保持长链接
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2055 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 504ms · UTC 14:48 · PVG 22:48 · LAX 06:48 · JFK 09:48
    ♥ Do have faith in what you're doing.