1.err:Error:Spawn failed

问题描述

部署中可能会出现错误

1
2
3
4
5
6
7
8
9
10
fatal: unable to access 'https://github.com/Aike505/Aike505.github.io.git/': OpenSSL SSL_read: Connection was reset, errno 10054
FATAL {
err: Error: Spawn failed
at ChildProcess.<anonymous> (E:\blog\aikeblog\node_modules\hexo-util\lib\spawn.js:51:21)
at ChildProcess.emit (node:events:394:28)
at ChildProcess.cp.emit (E:\blog\aikeblog\node_modules\cross-spawn\lib\enoent.js:34:29)
at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) {
code: 128
}
} Something's wrong. Maybe you can find the solution here: %s https://hexo.io/docs/troubleshooting.html

总结一下:

问题大多是因为git进行push或者hexo d的时候改变了一些.deploy_git文件下的内容。

解决办法

  1. 删除.deploy_git文件夹;
  2. 输入 git
    config --global core.autocrlf false
  3. 然后,依次执行:
1
2
3
hexo clean
hexo g
hexo d

问题解决。暴力直接,有效。

2.fatal: unable to access ‘https://github.com/.../.git‘: Could not resolve host: github.com

只需要在命令行中执行

1
2
git config --global --unset http.proxy
git config --global --unset https.proxy