替换/重制Homebrew源

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

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

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

恢复官方镜像:

#重置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

 

posted on 2017-11-28 10:56  longrui  阅读(1041)  评论(0编辑  收藏  举报