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

转:https://www.jianshu.com/p/c6ecbce5464f
 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章