防火墙屏蔽了github.com

来源:互联网 发布:sas统计软件价格 编辑:程序博客网 时间:2024/06/11 11:13

mac电脑升级导致brew不可用。重新安装brew,发现GFW把github屏蔽无法访问。
解决方法:
访问http://ipaddress.com/ 查询到github.com的真实ip。然后编辑/etc/hosts,将真实ip与域名映射。
#wulong: get real address from http://ipaddress.com/192.30.253.112  https://github.com192.30.253.112  http://github.com151.101.12.249  https://github.global.ssl.fastly.net




然后运行安装brew.
 /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 
 
卸载brew命令:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"


1 0
原创粉丝点击