Mac修改brew国内源以加快下载速度

镜像站:清华大学开源软件镜像站

简介
因为Homebrew默认的源是GitHub源,在国内因为你懂的原因,下载速度堪忧,顾考虑更换国内源,幸好中科大和清华都提供了brew源,因此我们考虑更换为这两个学校的brew源

替换现有上游

cd “$(brew –repo)”
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git

cd “$(brew –repo)/Library/Taps/homebrew/homebrew-core”
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git

brew update 复原

cd “$(brew –repo)”
git remote set-url origin https://github.com/Homebrew/brew.git

cd “$(brew –repo)/Library/Taps/homebrew/homebrew-core”
git remote set-url origin https://github.com/Homebrew/homebrew-core

brew update

效果很好,

作者:52Hetrz
链接:https://www.jianshu.com/p/c6ecbce5464f
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

Share your thoughts