解决curl: (7) Failed to connect to raw.githubusercontent.com port 443 after 16 ms

3,409 阅读1分钟

在安装nvm时,报curl: (7) Failed to connect to raw.githubusercontent.com port 443 after 16 ms: Couldn't connect to server。

这种问题遇到很多次了,知道需要更改hosts文件。

1、登录网站:www.ipaddress.com

2、输入raw.githubusercontent.com,查询域名对应的IP地址信息

3、将搜索结果中展示的Ip地址和域名拷贝系统hosts文件中:

sudo vi /etc/hosts

185.199.108.133	raw.githubusercontent.com

4、保存退出后,就可以正常使用了。