fetch-pack:读取边带数据包时意外断开连接

C.T*_*T.O 3 git macos terminal installation

我尝试使用代码安装brew来安装python库

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Run Code Online (Sandbox Code Playgroud)

但我收到这个错误

error: 1262 bytes of body are still expected MiB | 11.00 KiB/s 
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
Failed during: git fetch --force origin
Run Code Online (Sandbox Code Playgroud)

尝试了 gpt 解决方案,但没有成功。git config --global http.postBuffer 157286400 这将增加 Git 从远程存储库获取数据时使用的缓冲区的大小,这可能有助于解决由大文件或连接速度慢引起的问题。

我也尝试运行这个


export GIT_TRACE_PACKET=1
export GIT_TRACE=1
export GIT_CURL_VERBOSE=1
Run Code Online (Sandbox Code Playgroud)

我遇到了同样的错误。请记住,我的互联网工作正常并且我正在浏览网页。

小智 5

您可以尝试更改压缩配置:

git config --global core.compression 0
Run Code Online (Sandbox Code Playgroud)