正在连接 raw.githubusercontent.com 失败:拒绝连接

今天当我打算从GitHub下载一点东西的时候,出现了如下所示错误…

xxxx@localhost ~ % sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
--2023-06-17 17:45:50--  https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh
正在解析主机 raw.githubusercontent.com (raw.githubusercontent.com)... 0.0.0.0
正在连接 raw.githubusercontent.com (raw.githubusercontent.com)|0.0.0.0|:443... 失败:Connection refused。

解决

1. 查询IP

去这里 👇,输入raw.githubusercontent.com 进行查询:
https://site.ip138.com/

image.png

2. 将IP加入/ETC/HOSTS

从上述搜索结果中选一个

终端输入:

sudo nano /etc/hosts

image.png

保存退出。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容