curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

时间:2021-06-08 23:20:59   收藏:0   阅读:0

报错 curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

解决方法:
参考:
https://bbs.huaweicloud.com/blogs/143682
很多方法都没用,这个解决了问题。希望对你有用。

原因:由于某些你懂的因素,导致GitHub的raw.githubusercontent.com域名解析被污染了。

解决方法:通过修改hosts解决此问题。

查询真实IP

https://www.ipaddress.com/查询raw.githubusercontent.com的真实IP。
技术图片
修改hosts

sudo vim /etc/hosts

添加如下内容:

199.232.68.133 raw.githubusercontent.com

重新执行命令即可,但是下载会比较慢。

最后提一嘴,电脑连上你的手机热点有可能会有奇效。

原文链接:https://blog.csdn.net/sscc_learning/article/details/105574354

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!