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

Posted 柳鲲鹏

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了curl: Failed to connect to raw.githubusercontent.com port 443: Connection refused相关的知识,希望对你有一定的参考价值。

  就是网址不对。怎么办?

  • 查找IP

打开网站https://www.ipaddress.com。打不开?那阁下看看其他博文怎么说的。

输入raw.githubusercontent.com,看到当前IP。

  • 修改文件

打开/etc/hosts,输入以下内容(185.199.108.133就是刚刚查询到的IP)。

185.199.108.133 raw.githubusercontent.com

  • 再次尝试
curl -O https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc

以上是关于curl: Failed to connect to raw.githubusercontent.com port 443: Connection refused的主要内容,如果未能解决你的问题,请参考以下文章

curl: (7) Failed connect to localhost:9200; Connection refused

curl: (7) Failed connect to localhost:9200; Connection refused

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

我遇到的错误curl: Failed to connect to 127.0.0.1 port 1086: Connection refused

curl: Failed to connect to 127.**** port 1080: Connection refused on WSL2

cURL Error:Failed connect to *****.com:80; Connection timed out