美文网首页
go get失败,切换国内源

go get失败,切换国内源

作者: 小伟_be27 | 来源:发表于2020-10-04 12:49 被阅读0次

go get失败信息

go get -u github.com/astaxie/beego
go get github.com/astaxie/beego: module github.com/astaxie/beego: Get "https://proxy.golang.org/github.com/astaxie/beego/@v/list": dial tcp 172.217.160.81:443: connectex: A connection
attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

作者查看了本地go的版本

go version
go version go1.15.2 windows/amd64

windows用户

$ go env -w GO111MODULE=on
$ go env -w GOPROXY=https://goproxy.cn,direct

mac和linux用户

$ export GO111MODULE=on
$ export GOPROXY=https://goproxy.cn

你懂得有vpn软件的话,可以绕过这个。

相关文章

网友评论

      本文标题:go get失败,切换国内源

      本文链接:https://www.haomeiwen.com/subject/kmlnuktx.html