FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html 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)
解决办法
测试 SSH 连接
打开Git Bash(或 CMD/PowerShell),运行:
1
ssh -T git@github.com
可能结果
成功:输出 Hi ! You’ve successfully authenticated, but GitHub does not provide shell access.,表示SSH配置正确,问题可能出在网络或Hexo配置。
失败:输出 ssh: connect to host github.com port 22: Connection refused 或类似错误,继续以下步骤。
Host github.com HostName ssh.github.com User git Port 443 PreferredAuthentications publickey IdentityFile ~/.ssh/id_rsa
保存并关闭。
测试连接,运行:
1
ssh -T git@github.com
我这里提示的是:
1 2 3
The authenticity of host '[ssh.github.com]:443 ([20.205.243.160]:443)' can't be established. ......一串类似密匙和文件路径的内容(避免泄露隐私就不显示出来了) Are you sure you want to continue connecting (yes/no/[fingerprint])?