簡介
因爲Homebrew默認的源是GitHub源,在國內因爲你懂的原因,下載速度堪憂,顧考慮更換國內源,幸好中科大和清華都提供了brew源,因此我們考慮更換爲這兩個學校的brew源
替換現有上游
cd "$(brew --repo)"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/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://www.jianshu.com/p/c6ecbce5464f