前言,在我國作程序員有天生的劣勢,主要分爲
語言
和網絡環境
。git點到即止,
brew update
真心慢的一批程序員今天鄙人有幸分享一下如何讓電腦上的 homebrew 加速起飛github
鄙人用的是清華大學鏡像站shell
git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git
brew update
複製代碼
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.git
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://github.com/Homebrew/homebrew-cask.git
brew update
複製代碼
打開你正在使用的shell配置文件
,例如:.zshrc
網絡
在文件中合適位置(你看哪裏順眼加哪裏,無所謂)加入如下變量url
export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles
複製代碼
再試試 brew update
, 是否是單車變摩托spa