Mac/Windows

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

2019-06-24  本文已影响0人  52Hetrz

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

简介

因为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
上一篇 下一篇

猜你喜欢

热点阅读