博客主页
pod install错误记录
pod install错误记录

Author:

CC-star

©

Wordage:

共计 890 字

needs:

约 1 分钟

Popular:

4 ℃

Created:

目 录

报错代码

    error: RPC failed; curl 18 Transferred a partial file
   fetch-pack: unexpected disconnect while reading sideband packet
   fatal: early EOF

解决方案

  1. 增大 HTTP buffer 缓冲区

    git config --global http.postBuffer 524288000
    • http.postBuffer 的默认值只有 1MB。
    • 这里设置成 524288000(≈500MB),就是允许 Git 在传输时用更大的缓冲,避免下载大文件/大仓库时中途断开。

  1. 强制使用 HTTP/1.1

    git config --global http.version HTTP/1.1
    • Git 默认可能用 HTTP/2,但有时候 GitHub/GitLab 的 HTTP/2 连接会有兼容性问题。
    • 改成 HTTP/1.1 更稳定。

  1. 禁用低速限制

    git config --global http.lowSpeedLimit 0
    git config --global http.lowSpeedTime 999999
    • http.lowSpeedLimit:如果下载速度低于多少 KB/s 就认为失败。默认是 1 KB/s
    • http.lowSpeedTime:持续多少秒低速就断开。默认是 30s
    • 这两条命令相当于:不管多慢,只要不断就继续下载
文章二维码
pod install错误记录
共计 0 条评论,点此发表评论
博客主页 数据猫 漫游于星空的数据猫
技术支持 CC 数据猫. 2025
打赏图
打赏博主
欢迎
欢迎
欢迎访问数据猫
搜 索
足 迹
分 类
  • 简文
  • 技术
  • 娱乐