You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

执行Git pull遭遇RPC失败错误(curl 92),寻求解决办法

Git Pull 失败:RPC 错误与意外断开问题

执行git pull时遭遇传输失败,错误信息如下:

remote: Enumerating objects: 42, done.
remote: Counting objects: 100% (34/34), done.
remote: Compressing objects: 100% (11/11), done.
error: RPC failed; curl 92 HTTP/2 stream 7 was not closed cleanly: CANCEL (err 8)
error: 4136 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: unpack-objects failed

已尝试以下操作但未解决问题:

  • 增大Git缓冲区大小:
    git config --global http.postBuffer 524288000
    
  • 确认网络连接稳定,其他服务可正常访问

可行解决方法

1. 禁用HTTP/2协议

部分场景下HTTP/2的兼容性问题会引发这类错误,强制Git使用HTTP/1.1:

git config --global http.version HTTP/1.1

执行后再次尝试git pull,问题解决后可根据需求切换回HTTP/2或保持使用HTTP/1.1。

2. 清理缓存并重新拉取

先清理本地Git缓存,再尝试深度拉取:

git gc --prune=now
git fetch --deepen=1000

若仓库体积不大,也可直接重新克隆:

git clone <仓库地址>

3. 调整压缩级别

降低Git的压缩级别,减少传输过程中的资源消耗:

git config --global core.compression 0

拉取完成后可改回默认压缩级别(默认值为6):

git config --global core.compression 6

4. 等待远程服务器恢复

若上述方法均无效,可能是远程仓库服务器存在临时故障,间隔一段时间后再尝试拉取。

内容的提问来源于stack exchange,提问作者Hamza Malik

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.17 07:43:13