VS Code解决golang编译提示dial tcp 172.217.160.113:443: connectex: A connection attempt failed

在编译go的过程中是不是经常会遇到这样的报错
module ***: Get "https://proxy.golang.org/***": dial tcp 172.217.160.113: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 env -w GOPROXY=https://goproxy.cn

 如果用的是Goland,这样设置:“setting"--》“Go”--》“Go Modules”--》“Proxy”

 

 

 

 

 

posted @ 2020-09-07 22:58  西门运维  阅读(5526)  评论(2编辑  收藏  举报