On the Mac brew replace Tsinghua source

After a successful installation brew, enter the following command:

1, the official website brew.sh replication installation script.

2, the automatic installation is completed, the replacement source Tsinghua speed. Available at: https: //mirrors.tuna.tsinghua.edu.cn/help/homebrew

3, the replacement homebrew

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

Replace the homebrew-bottles (long-term change source)

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile

 

Guess you like

Origin www.cnblogs.com/tingguoguoyo/p/10991181.html