fatal: unable to access 'https://github.com/Homebrew/brew/': Could not resolve host: github.com
Failed during: git fetch origin master:refs/remotes/origin/master --tags --force
解决方式:
1.试着先在终端 ping github.com
MacBook-Pro:~$ ping github.com
PING github.com (13.250.177.223): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
- 如果 ping 出来是这种结果,就接着看第二步
- 修改 hosts 配置
- 在终端中 sudo vi /etc/hosts 打开编辑文件
- 按 s 进入编辑模式
- 接着在最下面添加 192.30.253.113 github.com