mac pro 下 brew 设置国内镜像

mac 下使用 brew install 命令时会比较慢,能够经过设置 brew 镜像为国内源来解决(本文使用清华镜像)。git

设置 homebrew

➜ cd "$(brew --repo)"
➜ git remote -v
origin	https://github.com/Homebrew/brew (fetch)
origin	https://github.com/Homebrew/brew (push)
➜ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git

设置homebrew-core

➜ cd "$(brew --repo homebrew/core)"
➜ git remote -v
origin	https://github.com/Homebrew/homebrew-core (fetch)
origin	https://github.com/Homebrew/homebrew-core (push)
➜ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git

执行更新

➜ brew update

参考:github

相关文章
相关标签/搜索