V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
git
Pro Git
Atlassian Git Tutorial
Pro Git 简体中文翻译
GitX
Shane
V2EX  ›  git

为什么SSH + SOCKS代理下不能git push?

  •  
  •   Shane · 2013-01-22 18:29:56 +08:00 · 4369 次点击
    这是一个创建于 4112 天前的主题,其中的信息可能已经有所发展或是发生改变。
    RT,在Terminal.app下无法git push ,一直未响应。。
    remote 用的是https://github.com/...
    7 条回复    1970-01-01 08:00:00 +08:00
    ratazzi
        1
    ratazzi  
       2013-01-22 18:32:33 +08:00
    自己都说了是 ssh,用的却是 https 的地址
    sobigfish
        2
    sobigfish  
       2013-01-22 20:16:40 +08:00
    还是dns被污染了,检查~/.ssh/known_hosts 有没有记录,github.com,207.97。227.239 开头,把ip加到hosts里吧
    amoblin
        3
    amoblin  
       2013-01-22 20:32:42 +08:00
    修改remote:

    git remote set-url origin [email protected]:...
    Shane
        4
    Shane  
    OP
       2013-01-22 22:20:54 +08:00 via iPhone
    @ratazzi 可是我在浏览器中访问https没问题啊
    ratazzi
        5
    ratazzi  
       2013-01-22 22:28:00 +08:00
    @Shane git 要单独设置的,跟浏览器一点关系都没有
    ratazzi
        6
    ratazzi  
       2013-01-22 22:28:28 +08:00   ❤️ 1
    BOYPT
        7
    BOYPT  
       2013-01-23 11:33:43 +08:00
    你的remote是https,你需要一个http代理,然后

    env https_proxy=http://you-proxy:port git push
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2605 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 15:44 · PVG 23:44 · LAX 08:44 · JFK 11:44
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.