Error:homebrew-core is a shallow clone
# 出现情景
Mac升级到新版本使用brew upgrade
出现.
Error:
homebrew-core is a shallow clone.
To `brew update`, first run:
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
This restriction has been made on GitHub's request because updating shallow
clones is an extremely expensive operation due to the tree layout and traffic of
Homebrew/homebrew-core and Homebrew/homebrew-cask. We don't do this for you
automatically to avoid repeatedly performing an expensive unshallow operation in
CI systems (which should instead be fixed to not use shallow clones). Sorry for
the inconvenience!
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
# 原因:
因为更新浅克隆(shallow clones)是一个相当消耗资源的操作,所以github请求被限制了
# 解决方法:
删除homebrew-core后再更新
cd /usr/local/Homebrew/Library/Taps/homebrew
rm -rf homebrew-core
brew upgrade
1
2
3
4
5
2
3
4
5
上次更新: 2021/07/08, 15:52:34