目录 1.mac电脑无法访问github官网的原因 2.解决方法 3.访问成功界面 4.github速度慢问题 5.安装Homebrew时遇到ERROR fatal: unable to access ‘https://github.co
目录
5.安装Homebrew时遇到ERROR fatal: unable to access ‘https://github.com/Homebrew/brew/’
可以参考:深入分析GitHub不能访问的原因及解决方案_笔记大全_设计学院
获取github.com的ip
方法一:
直接在终端输入命令
ping github.com
效果如下:
方法二:
效果如下:
修改hosts文件,文件位置 /etc/hosts ;
在电脑的hosts文最后一行加上
20.205.243.166 github.com
备注:如果无法修改,可能是文件没有写入权限,依次执行下面的命令后再加上,最后记得保存退出. (:wq)
cd /etcsudo chmod 777 hostsvi hosts
貌似还存在代码上传下载速度慢的问题~
103.228.130.27 Http://github.global.ssl.fastly.net
fatal: unable to access 'https://github.com/Homebrew/brew/': Recv failure: Operation timed outFailed during: /usr/bin/git fetch --force --tags origin
可以执行下面命令
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
即可解决
brew install git
来源地址:https://blog.csdn.net/qianxiao_anran/article/details/132639631
--结束END--
本文标题: Mac 电脑无法访问GitHub问题
本文链接: https://www.lsjlt.com/news/433457.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-01-21
2023-10-28
2023-10-28
2023-10-27
2023-10-27
2023-10-27
2023-10-27
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0