Skip to content

Instantly share code, notes, and snippets.

@dhb52
Last active April 22, 2019 08:29
Show Gist options
  • Save dhb52/2f106420c2ed66f9a48a21073edbe723 to your computer and use it in GitHub Desktop.
Save dhb52/2f106420c2ed66f9a48a21073edbe723 to your computer and use it in GitHub Desktop.
中科大brew源

中科大brew源

git -C "/usr/local/Homebrew" remote set-url origin https://mirrors.ustc.edu.cn/brew.git
git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

Bottle

对于bash用户:

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

对于zsh用户

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc

对于fish用户

echo 'set -xg HOMEBREW_BOTTLE_DOMAIN "https://mirrors.ustc.edu.cn/homebrew-bottles"' >> ~/.config/fish/config.fish
source ~/.config/fish/config.fish

恢复官方源

git -C "/usr/local/Homebrew" remote set-url origin https://github.com/Homebrew/brew.git
git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask" remote set-url origin https://github.com/Homebrew/homebrew-cask.git
git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" 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