其他分享
首页 > 其他分享> > [Golang]-9 Go Bulid 打包报错:A connection attempt failed……解决方法

[Golang]-9 Go Bulid 打包报错:A connection attempt failed……解决方法

作者:互联网

目录

现象

打包出现下面的错误

go build

go: github.com/auth0/go-jwt-middleware@v0.0.0-20190805220309-36081240882b: Get "https://proxy.golang.org/github.com/auth0/go-jwt-middleware/@v/v0.0.0-20190805220309-36081240882b.mod": dial tcp 216.58.200.241: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.mod 代理连接出错

解决方法

go.mod 设置代理

golang1.13.x 在命令行中可以直接执行:

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

标签:respond,Bulid,attempt,36081240882b,failed,connection,报错,go,mod
来源: https://www.cnblogs.com/feily/p/14523940.html