Skip to content

Instantly share code, notes, and snippets.

@zdway10
Forked from xiaolai/brew.md
Created March 17, 2020 22:52
Show Gist options
  • Save zdway10/5fff0d9fefea5ed5596f035d683a7926 to your computer and use it in GitHub Desktop.
Save zdway10/5fff0d9fefea5ed5596f035d683a7926 to your computer and use it in GitHub Desktop.
homebrew upstream repo for China
# 替换brew.git:
cd "$(brew --repo)"
git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git

# 替换homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git

# 替换homebrew-bottles:
cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment