欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 新闻 > 资讯 > mac执行brew services list时,无法连接GitHub

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

2025/2/5 18:06:24 来源:https://blog.csdn.net/weixin_48609829/article/details/145429767  浏览:    关键词: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就通了.

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com