MacOS---Updating Homebrew一直卡住如何处理?

替换 brew.git 仓库地址

# 替换成阿里的 brew.git 仓库地址
cd "$(brew --repo)"
git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
# 还原为官方提供的 brew.git 仓库地址
cd "$(brew --repo)"
git remote set-url origin https://github.com/Homebrew/brew.git

将Homebrew(homebrew-core.git)更换成阿里的源:

# 替换成阿里的 homebrew-core.git 仓库地址
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
# 还原官方 homebrew-core.git 仓库地址
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://github.com/Homebrew/homebrew-core.git

猜你喜欢

转载自blog.csdn.net/HHH_LLL/article/details/107502222
今日推荐