标签归档:brew

Brew使用阿里巴巴镜像源

国内访问国外的路线一直以来都不是很顺畅,坑哭了不少日夜奋斗在一线的码士。在这里特别感谢阿里巴巴开源镜像站为我们提供优质的服务。

@维基

Homebrew是一款自由及开放源代码的软件包管理系统,用以简化macOS系统上的软件安装过程,最初由马克斯·霍威尔(Max Howell)写成。因其可扩展性得到了一致好评,而在Ruby on Rails社区广为人知。

Homebrew使用GitHub,通过用户的贡献扩大对软件包的支持。2012年,Homebrew是GitHub上拥有最多新贡献者的项目。2013年,Homebrew同时成为GitHub上最多贡献者及最多已关闭问题的项目。

一、阿里巴巴镜像源

# 替换brew.git:
cd "$(brew --repo)"
git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
# 替换homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
# 应用生效
brew update

二、复原

cd "$(brew --repo)"
git remote set-url origin https://github.com/Homebrew/brew.git

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://github.com/Homebrew/homebrew-core

brew update