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

Hexo部署过程中可能会出现错误

1
2
3
4
5
6
7
8
9
10
fatal: unable to access 'https://github.com/anno189/anno189.github.io/': Failed to connect to github.com port 443: Connection refused
FATAL {
err: Error: Spawn failed
at ChildProcess.<anonymous> (/media/psf/Users/A.D.189/lifetimes/node_modules/hexo-util/lib/spawn.js:51:21)
at ChildProcess.emit (node:events:514:28)
at ChildProcess._handle.onexit (node:internal/child_process:294:12) {
code: 128
}
} Something's wrong. Maybe you can find the solution here: %s https://hexo.io/docs/troubleshooting.html

解决方式

1
2
3
4
5
6
7
8
9
10
11
12
##进入站点根目录
cd /usr/local/src/hexo/hanyubolg/

##删除git提交内容文件夹
rm -rf .deploy_git/

##执行
git config --global core.autocrlf false

##最后
hexo clean && hexo g && hexo d

以上,亲测有效