1.替换brew $ cd "$(brew --repo)"$ git remote set-url origin https://mirrors.ustc.edu.cn/brew.git 2.替换 homebrew-core.git $ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"$ git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git 3.替换homebrew-bottles 对于 bash 用户 echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profilesource ~/.bash_profile 对于 zsh 用户 echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrcsource ~/.zshrc 4.替换homebrew-cask cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-caskgit remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
参考:http://mirrors.ustc.edu.cn/help/homebrew-cask.git.html#