Brew 替换为国内源Mac

Posted jamywong

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Brew 替换为国内源Mac相关的知识,希望对你有一定的参考价值。

# 替换brew.git

cd "$(brew --repo)"

git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git

# 替换homebrew-core.git

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"

git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git

# 刷新源

brew update

 

 

Fish

# 替换brew.git

cd (brew --repo)

git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git

# 替换homebrew-core.git

cd (brew --repo)/Library/Taps/homebrew/homebrew-core

git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git

# 刷新源

brew update

以上是关于Brew 替换为国内源Mac的主要内容,如果未能解决你的问题,请参考以下文章

Mac下软件管理工具brew更换国内源及常用命令

brew更换为国内源

brew 替换国内镜像

macOS home brew国内下载速度慢,替换清华大学源

homebrew更新源

Mac入门--通过homebrew下载过慢问题