替换/重制Homebrew源

homebrew主要分两部分:git repo(位于GitHub)和二进制bottles(位于bintray),这二者在国内访问都不太顺畅。能够替换成国内的镜像,git repo国内镜像就比较多了,能够自行查找,提供二进制镜像的。如国内的源暂时没法访问也能够替换回官方的源。git

中科大镜像:https://lug.ustc.edu.cn/wiki/mirrors/help/brew.gitgithub

清华镜像:https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/url

恢复官方镜像:spa

#重置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
相关文章
相关标签/搜索