常见代理设置
目前国内的几个不错的goproxy
-
阿里云配置如下: export GOPROXY=https://mirrors.aliyun.com/goproxy/
-
nexus社区提供的 配置如下:export GOPROXY=https://gonexus.dev
-
goproxy.io 的配置如下:export GOPROXY=https://goproxy.io/
-
基于athens的公共服务 配置如下:export GOPROXY=https://athens.azurefd.net
-
官方提供的(jfrog,golang):
export GOPROXY=https://gocenter.io
export GOPROXY=https://proxy.golang.org -
七牛云赞助支持的: export GOPROXY=https://goproxy.cn
终端执行
go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/
connectex: A connection attempt failed 异常
在请求中返回:
go get github.com/go-redis/redis: module github.com/go-redis/redis: Get https://proxy.golang.org/github.com/go-redis/redis/@v/list: dial tcp 142.251.42.241:443: connectex: A c
onnection 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 res
pond.
解决方式:
go env -w GOPROXY=https://goproxy.cn