Hexo部署出现错误Error: Spawn failed解决方式

如果部署中弹出

1
2
3
4
5
Error: Spawn failed
at ChildProcess.<anonymous> (D:\blog\node_modules\hexo-deployer-git\node_modules\hexo-util\lib\spawn.js:51:21)
at ChildProcess.emit (node:events:519:28)
at cp.emit (D:\blog\node_modules\cross-spawn\lib\enoent.js:34:29)
at ChildProcess._handle.onexit (node:internal/child_process:294:12)

请检查 博客根目录下的_config.yml是不是这样

1
2
3
4
deploy:
type: 'git'
repo: 'https://github.com/Kemodowski/kemodowski.github.io.git'
branch: main

变更后

1
2
3
4
deploy:
type: 'git'
repo: https://github.com/Kemodowski/kemodowski.github.io.git
branch: main

就可以上传成功了。