安装 Homebrew 时出错 "unexpected disconnect while reading sideband packet"

Error installing Homebrew "unexpected disconnect while reading sideband packet"

我尝试使用命令

在 M1 Mac Mini 上安装 Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

如文档中所述。

然后中途报了这个错误

==> Tapping homebrew/core
remote: Enumerating objects: 1107077, done.
remote: Counting objects: 100% (228/228), done.
remote: Compressing objects: 100% (157/157), done.
error: 545 bytes of body are still expected.44 MiB | 341.00 KiB/s
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: index-pack failed
Failed during: git fetch --force origin refs/heads/master:refs/remotes/origin/master
myuser~ % 

这更多是 github 结帐问题而不是 Homebrew 问题,结帐 :

It might be your network issue. If the network is too slow, then it might disconnect connection unexpectedly.

If you are having a good internet and still getting this message then it might be an issue with post buffer. You can resolve it by executing the following command in your cmd.

git config --global http.postBuffer 157286400