常见问题之Golang——Failed to connect to github.com port 443:Timed out

常见问题之Golang——Failed to connect to github.com port 443:Timed out,第1张

常见问题之Golang——Failed to connect to github.com port 443:Timed out

 

背景

知识分享之Golang篇是我在日常使用Golang时学习到的各种各样的知识的记录,将其整理出来以文章的形式分享给大家,来进行共同学习。欢迎大家进行持续关注。

知识分享系列目前包含Java、Golang、Linux、Docker等等。

开发环境 系统:windows10语言:Golanggolang版本:1.17 内容 错误

go get: module XXXXXXXXXXXX : git ls-remote -q origin in XXXXXXXXXXXXXXX : exit status 128:
fatal: unable to access 'XXXXXXXXXXX ': Failed to connect to github.com port 443: Timed out

造成原因:

get拉取包时网络超时

解决方案:

1、首先使用浏览器确认包是否可正常访问到
2、查看当前git是否设置了其他代理或指定的地址,由于该仓库地址下没有导致。

-- 查看是否设置
 git config --global http.proxy
-- 去除相关设置
 git config --global --unset http.proxy

3、拉取再试尝试,如果仍不成功,可再设置git config --global url.git@github.com:.insteadOf http://www.kaotop.com/file/tupian/20220518/p 88x31.png

知识共享许可协议
本作品由 cn華少 采用 知识共享署名-非商业性使用 4.0 国际许可协议 进行许可。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/995326.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-21
下一篇 2022-05-21

发表评论

登录后才能评论

评论列表(0条)