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