go mod下载依赖错误Get https://sum.golang.org


 

 

verifying github.com/gorilla/websocket@v1.4.1/go.mod: github.com/gorilla/websocket@v1.4.1/go.mod: Get https://sum.golang.org/lookup/gi
thub.com/gorilla/websocket@v1.4.1: dial tcp 172.217.24.17: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.
————————————————

原因是1.13之后设置了默认的GOSUMDB=sum.golang.org,由于墙的原因无法访问,执行以下命令关闭即可:

go env -w GOSUMDB=off


免责声明!

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



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