Bootstrap

mac执行brew services list时,无法连接GitHub

==> Tapping homebrew/services
Cloning into ‘/opt/homebrew/Library/Taps/homebrew/homebrew-services’…
fatal: unable to access ‘https://github.com/Homebrew/homebrew-services/’: Failed to connect to github.com port 443 after 75018 ms: Couldn’t connect to server
Error: Failure while executing; git clone https://github.com/Homebrew/homebrew-services /opt/homebrew/Library/Taps/homebrew/homebrew-services --origin=origin --template= --config core.fsmonitor=false exited with 128.
Error: Failure while executing; /opt/homebrew/bin/brew tap homebrew/services exited with 1.

在终端中ping github.com也一直超时.

方法: 访问https://www.ipaddress.com
右上角输入github.com
在这里插入图片描述
A RECORDS下的IP显示为140.82.112.3
打开mac的终端

sudo vi /etc/hosts

在最下面一行添加
在这里插入图片描述
i进入编辑模式,esc退出,:wq保存
然后重启终端,再ping就通了.

;