golang运行项目时报错:dial tcp 172.217.27.145:443: c onnectex: A connection attempt failed because the connected party did not properly respond after a period of time


报错截图:

 

go: github.com/PuerkitoBio/goquery@v1.6.0: Get "https://proxy.golang.org/github.com/%21puerkito%21bio/goquery/@v/v1.6.0.mod": dial tcp 172.217.27.145:443: c
onnectex: 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.

 产生原因:

            你可以试着访问一下proxy.golang.org,怎么样,访问不了吧,没错,这是被我们伟大的长城防火墙给屏蔽了,你需要改成我们国内可用的代理地址

解决办法:

          重新设置代理

go env -w GOPROXY=https://goproxy.cn

  

搞定


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM