# Replace brew.git: $ cd "$(brew --repo)" # China HKUST: Remote git the SET $ -url Origin HTTPS: // mirrors.ustc.edu.cn/brew.git # Tsinghua University: Remote git the SET $ -url Origin HTTPS: // mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git # replace homebrew - core.git: $ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" # China HKUST: Remote git the SET $ -url Origin HTTPS: // mirrors.ustc.edu.cn/homebrew-core.git # Tsinghua University: Remote git the SET $ -url Origin HTTPS: // mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git # replace homebrew - Bottles: # China HKUST: $ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile $ source ~/.bash_profile # Tsinghua University: $ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.bash_profile $ source ~/.bash_profile # Applications to take effect: $ brew update
Switching official source
# Reset brew.git: $ cd "$(brew --repo)" $ git remote set-url origin https://github.com/Homebrew/brew.git # 重置homebrew-core.git: $ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" $ git remote set-url origin https://github.com/Homebrew/homebrew-core.git