# 替换brew.git:
jimmy@MacBook-Pro Library % cd "$(brew --repo)"
jimmy@MacBook-Pro Homebrew % git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
# 替换homebrew-core.git:
jimmy@MacBook-Pro Homebrew % cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
jimmy@MacBook-Pro homebrew-core % git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
# 终端输入命令:看输出结果是/bin/zsh还是/bin/bash
jimmy@MacBook-Pro homebrew-core % echo $SHELL
/bin/zsh
# /bin/zsh替换homebrew-bottles:
jimmy@MacBook-Pro homebrew-core % echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.zshrc
jimmy@MacBook-Pro homebrew-core % source ~/.zshrc
jimmy@MacBook-Pro homebrew-core %
###############
# 如果是 /bin/bash替换homebrew-bottles:
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile
https://blog.csdn.net/what951006/article/details/115188344