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

最近要用到homebrew,发现一直安装失败(如图)

试了很多方法,例如拷贝到本地,命令行运行,依旧不行(哭惨~)

最后发现一个绝妙办法,解决了!!!(开心!) - 附上原文地址-

https://github.com/hawtim/blog/issues/10

大致解决方法:

1. 失败原因判定是DNS污染

2. 下载一个修改host的软件,本方案用了switchhosts (鼠标点击下载对应软件)

3. 复制输入如下地址

199.232.68.133 raw.githubusercontent.com
199.232.68.133 user-images.githubusercontent.com
199.232.68.133 avatars2.githubusercontent.com
199.232.68.133 avatars1.githubusercontent.com

4. 激活

5. 成功解决所有问题!

猜你喜欢

转载自blog.csdn.net/i_CodeBoy/article/details/107386756