【bug fixed】hexo d的时候Spawn failed

在执行hexo d部署的时候,遇到报错:

bash 复制代码
% hexo d
INFO  Validating config
INFO  Deploying: git
INFO  Clearing .deploy_git folder...
INFO  Copying files from public folder...
INFO  Copying files from extend dirs...
[main 8e89088] Site updated: 2024-09-27 16:41:34
 4 files changed, 27 insertions(+), 27 deletions(-)
Enumerating objects: 733, done.
Counting objects: 100% (733/733), done.
Delta compression using up to 8 threads
Compressing objects: 100% (415/415), done.
error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400
send-pack: unexpected disconnect while reading sideband packet
Writing objects: 100% (733/733), 60.61 MiB | 23.52 MiB/s, done.
Total 733 (delta 185), reused 0 (delta 0), pack-reused 0
fatal: the remote end hung up unexpectedly
Everything up-to-date
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
Error: Spawn failed
    at ChildProcess.<anonymous> (/Users/zhaodongyu/Documents/Blog/node_modules/hexo-util/lib/spawn.js:51:21)
    at ChildProcess.emit (node:events:520:28)
    at ChildProcess._handle.onexit (node:internal/child_process:294:12)

看信息与 Hexo 的部署到 Git 仓库过程中发生的 RPC failed 错误有关。

错误信息中显示有 60.61 MiB 的数据,这会超过 GitHub 或其他 Git 服务器的默认传输大小限制。

我通过增加 Git 的 HTTP 传输缓冲区大小来解决:

git config --global http.postBuffer 524288000

这会将 Git 的 HTTP 缓冲区增加到 500MB(默认是 1MB)。

问题解决。


如果这样还是不能解决,在hexo的官网中也有相关讨论:

相关推荐
ALGO阿狗9 天前
SimpleDateFormat(“YYYY-MM-dd“)格式化时间出现了bug?
bug
爱学习的小可爱卢10 天前
JavaSE基础-Java异常体系:Bug定位终极指南
java·bug·javase
GeekyGuru10 天前
代码诊疗室——疑难Bug破解战
bug
嵌入式×边缘AI:打怪升级日志13 天前
9.2.3 UART 驱动严重 Bug(保姆级讲解)
bug
qq_242188633215 天前
代码诊疗室——疑难Bug破解战
bug
Moshow郑锴17 天前
Java SpringBoot 疑难 Bug 排查思路解析:从“语法正确”到“行为相符”
java·spring boot·bug
人间花海17 天前
BUG终结者:挑战你的调试极限
bug
2401_8582861117 天前
OS54.【Linux】System V 共享内存(3) “共享内存+管道“修bug记录
linux·运维·服务器·算法·bug
Kurbaneli18 天前
代码诊疗室——疑难Bug破解战
bug
Mr -老鬼20 天前
从 0 到 1 落地:Rust + Salvo 实现用户系统与 Bug 管理系统
开发语言·rust·bug