替换国内源

参考Mac 下 brew 切换为国内源

查看 brew.git 当前源

cd "$(brew --repo)" && git remote -v

查看homebrew-core.git 当前源

cd "$(brew --repo homebrew/core)" && git remote -v

修改brew.git为阿里源

git -C "$(brew --repo)" remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git

修改homebrew-core.git为阿里源

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

zsh 替换brew bintray镜像

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc

刷新源

brew update

Macos升级后brew异常问题

参考macos 升级后brew异常问题

解决方式

cd /usr/local/Homebrew/
git pull