今天在执行go项目的指令go get github.com/astaxie/beego
时,出现如下问题
go: github.com/astaxie/beego@v1.12.3: Get "https://proxy.golang.org/github.com/astaxie/beego/@v/v1.12.3.mod": 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 env -w GOPROXY=https://goproxy.cn
如图所示:
执行玩上诉指令后,我们再次执行指令go get github.com/astaxie/beego
,即可完成下载,如图所示: