itfanr
V2EX  ›  问与答

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

  •  
  •   itfanr · Dec 14, 2014 · 22977 views
    This topic created in 4166 days ago, the information mentioned may be changed or developed.
    --- 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 replies    2019-05-21 14:05:38 +08:00
    zx9597446
        1
    zx9597446  
       Dec 15, 2014
    挂代理吧
    经常被墙
    itfanr
        2
    itfanr  
    OP
       Dec 15, 2014
    @zx9597446 应该不是代理的问题
    terrywater
        3
    terrywater  
       Dec 28, 2017
    解决了吗?我也是呢,安装 gin `go get github.com/gin-gonic/gin ` 就是不行
    itfanr
        4
    itfanr  
    OP
       Jan 4, 2018
    @terrywater 没有 后来没有继续搞
    hyyou2010
        5
    hyyou2010  
       May 16, 2018
    我在 ubuntu 下设置 ss 客户端为 http 模式,然后运行:
    export http_proxy=http://127.0.0.1:1080
    export https_proxy=http://127.0.0.1:1080
    就可以了
    as94boy
        6
    as94boy  
       May 21, 2019
    这个 hosts 中加个 ip 到域名映射就好了 :192.30.253.113 github.com
    当然前提是 ping 下 github.com 看看能不能走通,不能就试试给的方法。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5506 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 48ms · UTC 03:51 · PVG 11:51 · LAX 20:51 · JFK 23:51
    ♥ Do have faith in what you're doing.