dszdiavv474681 2019-04-26 14:42 采纳率: 0%
浏览 1418

无法从git clone go.googlesource.com克隆Git存储库

I would like to learn Go language so I wanted to start with tooling installation first. However, I am not able to install golang tools with neither go get -u golang.org/x/tools nor git clone https://go.googlesource.com/tools. Both of them results into Connection timeout error, the whole message is

⇒  go get -u golang.org/x/tools -v
# cd .; git clone https://go.googlesource.com/tools /home/pmensik/go/src/golang.org/x/tools
Cloning into '/home/pmensik/go/src/golang.org/x/tools'...
fatal: unable to connect to go.googlesource.com:
go.googlesource.com[0: 2a00:1450:400c:c0a::52]: errno=Connection timed out
go.googlesource.com[1: 173.194.76.82]: errno=Connection timed out

package golang.org/x/tools: exit status 128
package -v: unrecognized import path "-v" (import path does not begin with hostname)

Basically the same is for git clone.

I also tried to authenticate via .gitcookie file generated on go.googlesource.com but it didn't help as well. I can clone any other repositories and I don't experience any other network problem.

My platform is elementaryOS Loki based on Ubuntu 16.02, I am not using VPN or any proxies. go env says the following

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/pmensik/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/pmensik/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build729564191=/tmp/go-build -gno-record-gcc-switches"

So any ideas what could be wrong? Thanks for your help.

  • 写回答

1条回答 默认 最新

  • dongza3124 2019-04-27 18:35
    关注

    I finally solved it with downloading all the stuff all need in a virtual machine. I am still not sure why it doesn't work on my host machine.

    评论

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料