Hexo 个人博客上传大文件时出错

Anrola Lv1

我尝试把大文件部署到GitHub时会报错。

1
2
3
4
5
6
7
8
9
10
11
12
13
remote: fatal: pack exceeds maximum allowed size (2.00 GiB)
fatal: sha1 file '<stdout>' write error: Broken pipe
error: remote unpack failed: index-pack failed
To github.com:Anrola-star/Anrola-star.github.io.git
! [remote rejected] HEAD -> main (failed)
error: failed to push some refs to 'github.com:Anrola-star/Anrola-star.github.io.git'
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
Error: Spawn failed
at ChildProcess.<anonymous> (D:\works\blog\myblogs\node_modules\hexo-deployer-git\node_modules\hexo-util\lib\spawn.js:51:21)
at ChildProcess.emit (node:events:509:28)
at cp.emit (D:\works\blog\myblogs\node_modules\cross-spawn\lib\enoent.js:34:29)
at ChildProcess._handle.onexit (node:internal/child_process:295:12)

好像上传超过2G就会报错。

我把文件删除后,上传依然超过2G。
原来部署时会上传.deploy_git里的文件,仅仅删除源文件不起作用。

解决方法是把.deploy_git整个删掉。

  • Title: Hexo 个人博客上传大文件时出错
  • Author: Anrola
  • Created at : 2026-08-06 23:26:50
  • Updated at : 2026-08-07 00:09:08
  • Link: https://redefine.ohevan.com/2026/08/06/git-usage2/
  • License: This work is licensed under CC BY-NC-SA 4.0.
On this page
Hexo 个人博客上传大文件时出错