零、Homebrew 鏡像地址(推薦中科大鏡像)
1、brew.git 鏡像
中科大鏡像:https://mirrors.ustc.edu.cn/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.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
GitHub鏡像:https://github.com/Homebrew/homebrew-core
一窒舟、替換 Homebrew 鏡像源
1工腋、替換 brew.git
以中科大鏡像為例
$ cd "$(brew --repo)"
$ git remote set-url origin?https://mirrors.ustc.edu.cn/brew.git
或
$ git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git
2、替換 homebrew-core.git
以中科大鏡像為例
$ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
$ git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
或
$ git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
二岸蜗、重置 Homebrew?鏡像源
切回官方原始鏡像(GitHub)
$ git -C "$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew.git
$ git -C "$(brew --repo homebrew/core)" remote set-url origin https://github.com/Homebrew/homebrew-core