itfanr
V2EX  ›  问与答

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

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