mikicomo
V2EX  ›  问与答

Git 设置代理的问题

  •  
  •   mikicomo · Dec 20, 2015 · 3330 views
    This topic created in 3970 days ago, the information mentioned may be changed or developed.

    http://r.loli.io/VF3E3a.png

    这样应该已经设置好了代理吧,为什么我在当前目录 git clone 的时候还是 10K/S 呢,
    [有什么办法不用局部设置代理, global 中设置 github 走代理,其他直连的?]

    8 replies  •  2015-12-21 11:15:13 +08:00
    bigtan
    bigtan
    Dec 20, 2015
    1
    你 clone 的时候是走的 https 协议吗?也许是 git 协议
    mikicomo
    mikicomo
    OP
    Dec 20, 2015
    2
    @bigtan 是 https 协议的
    Daniel65536
    Daniel65536
    Dec 20, 2015 via iPad
    3
    https 代理的意思是用来给 https 开头的连接用的代理,不是说代理地址的开头是 https ,所以你 127 前面那个 https 应当换成 http 。
    然后 1080 看起来是 ss 提供的代理? ss 提供的代理是 socks5 的,你要装个 polipo 转换成 http 代理。
    mikicomo
    mikicomo
    OP
    Dec 20, 2015
    4
    @Daniel65536 呃呃,那个 127 前面的 https 的确是手滑了没注意,需要装个 polipo 才行?
    hardware
    hardware
    Dec 20, 2015
    5
    proxychains-ng 解决
    ryd994
    ryd994
    Dec 21, 2015 via Android
    6
    @Daniel65536 socks5://127.0.0.1:1080 不行么?
    Strikeactor
    Strikeactor
    Dec 21, 2015
    7
    tsocks
    mikicomo
    mikicomo
    OP
    Dec 21, 2015
    8
    @Daniel65536
    @Strikeactor
    @ryd994
    @bigtan
    @hardware
    git config --local http.proxy 'socks5://127.0.0.1:1080'
    git config --local https.proxy 'socks5://127.0.0.1:1080'
    已经成功了,查了下 Git 原生支持 socks5 协议的.....= =
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3779 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 05:23 · PVG 13:23 · LAX 21:23 · JFK 00:23
    ♥ Do have faith in what you're doing.