问题:macOS安装Homebrew时总是报错(Failed to connect to raw.githubusercontent.com port 443: Connection refused)
原因:GitHub的raw.githubusercontent.com域名解析被污染了
解决办法:通过修改hosts解决此问题。
查询真实IP
在The Best IP Address, Email and Networking Tools - IPAddress.com查询raw.githubusercontent.com的真实IP。
修改hosts
sudo vim /etc/hosts
添加内容如下:
199.232.28.133 raw.githubusercontent.com
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"