fatal: unable to access 'https://github.com/Homebrew/brew/'


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 出来是这种结果,就接着看第二步
  1. 修改 hosts 配置
    • 在终端中 sudo vi /etc/hosts 打开编辑文件
    • 按 s 进入编辑模式
    • 接着在最下面添加 192.30.253.113 github.com


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM