Mac Homebrew镜像

众所周知 Homebrew 很慢
那么,你该出个分身斧,弄个镜像了。

参考
https://www.zhihu.com/question/31360766/answer/749386652

替换 Homebrew

git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git

替换 Homebrew Core

git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

替换 Homebrew Cask

git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git

替换 Homebrew-bottles

对于 bash 用户:

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile

对于 zsh 用户:

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。