【已解决】fetch-pack: unexpected disconnect while reading

  • 时间:2025-12-11 00:29 作者: 来源: 阅读:18
  • 扫一扫,手机访问
摘要:问题说明:在使用PlatformIO编译ESP32-S3项目时遇到了Git克隆失败的错误,主要是网络连接问题。从错误信息看,主要是RPC失败和连接被重置,导致无法从GitHub下载arduino-esp32库。保存信息:Resolving esp32-s3-devkitc-1 dependencies... Removing unused dependencies... Library Manag

问题说明:

在使用PlatformIO编译ESP32-S3项目时遇到了Git克隆失败的错误,主要是网络连接问题。从错误信息看,主要是RPC失败和连接被重置,导致无法从GitHub下载arduino-esp32库。

保存信息:


Resolving esp32-s3-devkitc-1 dependencies... Removing unused dependencies... Library Manager: Removing ArduinoOTA @ 3.3.3+sha.0ae0838 Library Manager: ArduinoOTA@3.3.3+sha.0ae0838 has been removed! Library Manager: Installing git+https://github.com/espressif/arduino-esp32.git#2.0.9 git version 2.48.1.windows.1 Cloning into 'C:UsersAdministrator.platformio.cache mppkg-installing-5q465_tp'... error: RPC failed; curl 56 Recv failure: Connection was reset error: 370 bytes of body are still expected fetch-pack: unexpected disconnect while reading sideband packet fatal: early EOF fatal: fetch-pack: invalid index-pack output VCSBaseException: VCS: Could not process command ['git', 'clone', '--recursive', '--depth', '1', '--branch', '2.0.9', 'https://github.com/espressif/arduino-esp32.git', 'C:UsersAdministrator.platformio.cache mppkg-installing-5q465_tp']


【解决方案】使用镜像源,避免直接从GitHub克隆。

在platformio.ini中使用国内镜像:
lib_deps =
https://gitee.com/mirrors/arduino-esp32.git#2.0.9

例如:

直接修改你的 platformio.ini 文件,将 lib_deps 部分替换为国内Gitee镜像的地址:

[env:esp32-s3-devkitc-1]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
monitor_speed = 115200
; 其他配置...

lib_deps = 
    https://gitee.com/mirrors/arduino-esp32.git#2.0.9

保存文件后,PlatformIO会自动从Gitee镜像下载,速度更快且更稳定。

【已解决】fetch-pack: unexpected disconnect while reading




  • 全部评论(0)
最新发布的资讯信息
【系统环境|】技术JD解码黑箱:CTO埋的隐藏关卡与破局指南(2026-01-08 23:14)
【系统环境|】K8S部署 Qwen3-32B 大模型详细教程(2026-01-08 23:13)
【系统环境|】VibeCoding终极指南:别做Prompt做PM(2026-01-08 23:13)
【系统环境|】工具参数预设功能实现与安全实践指南:基于LlamaIndex Forge(2026-01-08 23:13)
【系统环境|】Spring AI + OpenAI 环境构建完整指南(2026-01-08 23:13)
【系统环境|】FFT魔力觉醒:FFTW C++高性能变换指南(2026-01-08 23:13)
【系统环境|】Docker+Ollama+Deepseek 本地大模型部署指南(2026-01-08 23:13)
【系统环境|】「WordPress建站05」宝塔安装网站SSL、伪静态设置(2026-01-08 23:12)
【系统环境|】域名还有更便宜的?从namesilo迁移到cloudflare,详细教程!(2026-01-08 23:12)
【系统环境|】Eplan P8 win10系统安装方法,亲测可用(2026-01-08 23:12)
手机二维码手机访问领取大礼包
返回顶部