mikicomo
V2EX  ›  问与答

Git 设置代理的问题

  •  
  •   mikicomo · Dec 20, 2015 · 3126 views
    This topic created in 3821 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
        1
    bigtan  
       Dec 20, 2015
    你 clone 的时候是走的 https 协议吗?也许是 git 协议
    mikicomo
        2
    mikicomo  
    OP
       Dec 20, 2015
    @bigtan 是 https 协议的
    Daniel65536
        3
    Daniel65536  
       Dec 20, 2015 via iPad
    https 代理的意思是用来给 https 开头的连接用的代理,不是说代理地址的开头是 https ,所以你 127 前面那个 https 应当换成 http 。
    然后 1080 看起来是 ss 提供的代理? ss 提供的代理是 socks5 的,你要装个 polipo 转换成 http 代理。
    mikicomo
        4
    mikicomo  
    OP
       Dec 20, 2015
    @Daniel65536 呃呃,那个 127 前面的 https 的确是手滑了没注意,需要装个 polipo 才行?
    hardware
        5
    hardware  
       Dec 20, 2015
    proxychains-ng 解决
    ryd994
        6
    ryd994  
       Dec 21, 2015 via Android
    @Daniel65536 socks5://127.0.0.1:1080 不行么?
    Strikeactor
        7
    Strikeactor  
       Dec 21, 2015
    tsocks
    mikicomo
        8
    mikicomo  
    OP
       Dec 21, 2015
    @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   ·   Solana   ·   909 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 47ms · UTC 22:15 · PVG 06:15 · LAX 15:15 · JFK 18:15
    ♥ Do have faith in what you're doing.