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

向Azure DevOps执行git push时出现RPC失败等错误,如何解决?

问题

将包含大量文件的全新项目推送到Azure DevOps时,执行git push出现如下错误:

Enumerating objects: 136, done.
Counting objects: 100% (136/136), done.
Delta compression using up to 16 threads
Compressing objects: 100% (125/125), done.
Writing objects: 100% (134/134), 270.82 KiB | 2.65 MiB/s, done.
Total 134 (delta 28), reused 0 (delta 0), pack-reused 0
error: RPC failed; curl 56 HTTP/2 stream 7 was reset
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
Everything up-to-date

环境信息:Windows 11最新版本、PowerShell 7.4.2控制台、Git版本2.41.0.windows.1

解决方法

  • 增大Git的HTTP缓存和传输限制:调整Git配置,避免因数据包过大导致连接断开
    git config --global http.postBuffer 524288000
    git config --global http.maxRequestBuffer 100M
    
  • 禁用HTTP/2协议:部分场景下Azure DevOps的HTTP/2连接稳定性不足,切换到HTTP/1.1可解决问题
    git config --global http.version HTTP/1.1
    
  • 分批次推送文件:若项目文件数量过多,拆分推送步骤降低单次传输压力
    1. 创建.gitignore排除大部分文件,仅保留少量核心文件
    2. 执行git add、git commit、git push完成首次推送
    3. 逐步移除.gitignore中的规则,添加更多文件后重复推送流程
  • 检查网络连接:确保本地网络稳定,尝试切换有线网络或更换网络环境后重试
  • 更新Git版本:尽管当前使用2.41.0版本,仍可尝试升级到最新版Git,修复已知的连接类bug

内容的提问来源于stack exchange,提问作者Maytham Fahmi

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.24 21:21:00