简介
因为Homebrew默认的源是GitHub源,在国内下载速度堪忧,考虑更换国内源,幸好中科大和清华都提供了brew源,因此我们考虑更换为这两个学校的brew源
替换源
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
brew update
复原
cd "$(brew --repo)"
git remote set-url origin https://github.com/Homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://github.com/Homebrew/homebrew-core
brew update
参考
https://juejin.im/post/6844903651371139080