替换及重置Homebrew默认源
替换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
替换Homebrew Bottles源
对于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
在中科大源失效或宕机时可以切换回官方源
重置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
本站遵循CC协议署名-非商业性使用-相同方式共享
转载请注明来自:稚子的成长博客
相关推荐
- php获取url的301/302后url
- Posted on 11月23日
- Composer 国内加速,修改镜像源
- Posted on 07月15日
- 如何在阿里云通过He.net添加IPV6的支持
- Posted on 12月28日
- 如何严格设置php中session过期时间
- Posted on 08月11日