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

go get 命令无法从 github 下载代码

  •  
  •   itfanr · 2014-12-14 21:48:28 +08:00 · 22330 次点击
    这是一个创建于 3414 天前的主题,其中的信息可能已经有所发展或是发生改变。
    --- github.com ping statistics ---
    113 packets transmitted, 78 packets received, 31.0% packet loss
    round-trip min/avg/max/stddev = 245.112/349.933/623.099/47.023 ms

    我可以访问github,虽然丢包很多,网页可以打开。但是go get命令无法下载代码。求办法。。。

    itfanr-MacBook-Pro:~ itfanr$ go get -u github.com/gpmgo/gopm
    # cd .; git clone https://github.com/gpmgo/gopm /Users/itfanr/Documents/code/go/src/github.com/gpmgo/gopm
    Cloning into '/Users/itfanr/Documents/code/go/src/github.com/gpmgo/gopm'...
    fatal: unable to access 'https://github.com/gpmgo/gopm/': Empty reply from server
    package github.com/gpmgo/gopm: exit status 128
    6 条回复    2019-05-21 14:05:38 +08:00
    zx9597446
        1
    zx9597446  
       2014-12-15 09:03:22 +08:00
    挂代理吧
    经常被墙
    itfanr
        2
    itfanr  
    OP
       2014-12-15 18:34:44 +08:00
    @zx9597446 应该不是代理的问题
    terrywater
        3
    terrywater  
       2017-12-28 10:05:11 +08:00
    解决了吗?我也是呢,安装 gin `go get github.com/gin-gonic/gin ` 就是不行
    itfanr
        4
    itfanr  
    OP
       2018-01-04 19:18:41 +08:00
    @terrywater 没有 后来没有继续搞
    hyyou2010
        5
    hyyou2010  
       2018-05-16 18:51:24 +08:00
    我在 ubuntu 下设置 ss 客户端为 http 模式,然后运行:
    export http_proxy=http://127.0.0.1:1080
    export https_proxy=http://127.0.0.1:1080
    就可以了
    as94boy
        6
    as94boy  
       2019-05-21 14:05:38 +08:00
    这个 hosts 中加个 ip 到域名映射就好了 :192.30.253.113 github.com
    当然前提是 ping 下 github.com 看看能不能走通,不能就试试给的方法。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2475 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 15:41 · PVG 23:41 · LAX 08:41 · JFK 11:41
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.