Mac use brew question (very slow)

brew install or brew update is very slow!

Domestic use of mirrors:

1、替换现有上游 
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
 

2、复原方法
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
 

The agency still feel relatively fast:

Temporary agency added:

export ALL_PROXY=socks5://127.0.0.1:1081

Acting permanently added:

echo export ALL_PROXY=socks5://127.0.0.1:1080 >> ~/.bash_profile

source ~/.base_profile

 

Published 29 original articles · won praise 5 · Views 7973

Guess you like

Origin blog.csdn.net/qq_25194685/article/details/105224323