原因与过程
-
今天在linux下安装docker compose出现
Failed connect to github.com:443
; 拒绝连接 -
网上查了下说是DNS被污染,改下host文件文章来源:https://www.toymoban.com/news/detail-517454.html
解决办法
- 首先你可以通过https://www.ipaddress.com/首页,输入 raw.githubusercontent.com 进行查询
- 修改hosts
vim /etc/hosts
在最底下添加199.232.68.133 raw.githubusercontent.com
保存起来即可
这个也同样可以解决 git 上的一些问题,也建议同时查找一下 github.com 的真实 ip 添加进去文章来源地址https://www.toymoban.com/news/detail-517454.html
140.82.113.3 github.com
140.82.114.20 gist.github.com
151.101.184.133 assets-cdn.github.com
151.101.184.133 raw.githubusercontent.com
151.101.184.133 gist.githubusercontent.com
151.101.184.133 cloud.githubusercontent.com
151.101.184.133 camo.githubusercontent.com
151.101.184.133 avatars0.githubusercontent.com
199.232.68.133 avatars0.githubusercontent.com
199.232.28.133 avatars1.githubusercontent.com
151.101.184.133 avatars1.githubusercontent.com
151.101.184.133 avatars2.githubusercontent.com
199.232.28.133 avatars2.githubusercontent.com
151.101.184.133 avatars3.githubusercontent.com
199.232.68.133 avatars3.githubusercontent.com
151.101.184.133 avatars4.githubusercontent.com
199.232.68.133 avatars4.githubusercontent.com
151.101.184.133 avatars5.githubusercontent.com
199.232.68.133 avatars5.githubusercontent.com
151.101.184.133 avatars6.githubusercontent.com
199.232.68.133 avatars6.githubusercontent.com
151.101.184.133 avatars7.githubusercontent.com
199.232.68.133 avatars7.githubusercontent.com
151.101.184.133 avatars8.githubusercontent.com
199.232.68.133 avatars8.githubusercontent.com
到了这里,关于使用 curl/git 命令时出现 Failed to connect to XXX port 443: 拒绝连接的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!