● 【homebrew】Error: Failure while executing; `git clone ***

报错信息:

Error: Failure while executing; 'git clone https://github.com/Homebrew/homebrew-cask /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask' exited with 128.

替换homebrew源

cd "$(brew --repo)"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git

替换homebrew-core源

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git

brew update

如果还没解决,参考:https://blog.csdn.net/DuXiaoYu1111/article/details/114663146