-
-
Save zhangw/89c663bd2e900a1f4942216db55b7678 to your computer and use it in GitHub Desktop.
brew mirrors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## tsinghua | |
| 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 | |
| # brew bottles | |
| echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.bash_profile | |
| source ~/.bash_profile | |
| # homebrew-science | |
| cd "$(brew --repo)/Library/Taps/homebrew/homebrew-science" | |
| git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-science.git | |
| # homebrew-python | |
| cd "$(brew --repo)/Library/Taps/homebrew/homebrew-python" | |
| git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-python.git | |
| brew update | |
| ################# | |
| ## ustc | |
| # 替换brew.git: | |
| cd "$(brew --repo)" | |
| git remote set-url origin https://mirrors.ustc.edu.cn/brew.git | |
| # 替换homebrew-core.git: | |
| cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" | |
| git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git | |
| # bottles | |
| echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile | |
| source ~/.bash_profile | |
| ################ | |
| ## restore origin | |
| # 重置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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment