1、brew.git 镜像
中科大镜像:https://mirrors.ustc.edu.cn/brew.git
阿里镜像: https://mirrors.aliyun.com/homebrew/brew.git
清华镜像:https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
GitHub镜像:https://github.com/Homebrew/brew.git
2、homebrew-core.git 镜像
中科大镜像:https://mirrors.ustc.edu.cn/homebrew-core.git
阿里镜像: https://mirrors.aliyun.com/homebrew/homebrew-core.git
清华镜像:https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
GitHub镜像:https://github.com/Homebrew/homebrew-core
3、homebrew-cask.git 镜像
# 中科大镜像
https://mirrors.ustc.edu.cn/homebrew-cask.git
# 阿里暂无该镜像
# github镜像
https://github.com/Homebrew/homebrew-cask.git
一、切换 Homebrew 镜像源为中科大镜像源
1、替换源
以中科大镜像为例
# 替换brew.git:
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
# 替换homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
# 替换homebrew-cask.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-cask"
git remote set-url origin https://mirrors.ustc.edu.cn/