V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
mikicomo
V2EX  ›  问与答

Git 设置代理的问题

  •  
  •   mikicomo · 2015-12-20 22:01:47 +08:00 · 2661 次点击
    这是一个创建于 3059 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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

    8 条回复    2015-12-21 11:15:13 +08:00
    bigtan
        1
    bigtan  
       2015-12-20 22:06:10 +08:00
    你 clone 的时候是走的 https 协议吗?也许是 git 协议
    mikicomo
        2
    mikicomo  
    OP
       2015-12-20 22:09:54 +08:00
    @bigtan 是 https 协议的
    Daniel65536
        3
    Daniel65536  
       2015-12-20 22:12:58 +08:00 via iPad
    https 代理的意思是用来给 https 开头的连接用的代理,不是说代理地址的开头是 https ,所以你 127 前面那个 https 应当换成 http 。
    然后 1080 看起来是 ss 提供的代理? ss 提供的代理是 socks5 的,你要装个 polipo 转换成 http 代理。
    mikicomo
        4
    mikicomo  
    OP
       2015-12-20 22:17:52 +08:00
    @Daniel65536 呃呃,那个 127 前面的 https 的确是手滑了没注意,需要装个 polipo 才行?
    hardware
        5
    hardware  
       2015-12-20 22:22:17 +08:00
    proxychains-ng 解决
    ryd994
        6
    ryd994  
       2015-12-21 01:11:00 +08:00 via Android
    @Daniel65536 socks5://127.0.0.1:1080 不行么?
    Strikeactor
        7
    Strikeactor  
       2015-12-21 01:15:25 +08:00
    tsocks
    mikicomo
        8
    mikicomo  
    OP
       2015-12-21 11:15:13 +08:00
    @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 协议的.....= =
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   779 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 22:09 · PVG 06:09 · LAX 15:09 · JFK 18:09
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.