更换mac的brew源

替换 brew.git:

# cd到 Homebrew 目录
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
替换 homebrew-bottles: 二进制文件, 注意自己机器上使用的 SHELL

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc
替换 homebrew-cask.git: cask 表示 GUI 应用的源, 阿里云没有提供 cask 源, 故使用 USTC 源

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

你可能感兴趣的:(更换mac的brew源)