Homebrew solve the problem of slow download updates

https://www.jianshu.com/p/055832c19148

 

Since the problem is mainly in the domestic network environment github download slow, so try:

Replace domestic use of homebrew mirror source;

Use a proxy to access github.com .

Homebrew replacement source

Use the following command to replace the mirrors on domestic homebrew Ali says:

# Replace brew.git:

cd "$(brew --repo)"

git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git

# Replace homebrew-core.git:

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"

git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git

# Replace homebrew-bottles:

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.zshrc

source ~/.zshrc

After the replacement, the problem persists, continue to view the log:

 

Because you can see homebrew-cask warehouse still point to Github, this process is slow. Ali cloud mirror station does not provide homebrew-cask, further search found USTC mirror station , the station provides a source of homebrew-cask. Using the same command replacement source:

# Replace homebrew-cask.git:

cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask

git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git

 

Tests find problems to solve.

Guess you like

Origin www.cnblogs.com/chenzeyong/p/12152795.html