0%

关于我在hexo d部署新文章的时候出现的报错解决

起因

起因是煮波今天把Nodejs的vm沙箱逃逸这个坑填上之后,美滋滋准备更新一下

突然间pwn的一下,hexo d的时候出现了

1
2
3
4
5
6
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
Error: Spawn failed
at ChildProcess.<anonymous> (E:\blogs\myblog\node_modules\hexo-deployer-git\node_modules\hexo-util\lib\spawn.js:51:21)
at ChildProcess.emit (node:events:519:28)
at cp.emit (E:\blogs\myblog\node_modules\cross-spawn\lib\enoent.js:34:29)
at ChildProcess._handle.onexit (node:internal/child_process:294:12)

随后就上网查了几种解决方法
暴力型
网络掉线+重装hexo-deployer-git

然而并没有什么卵用

随后又去官方文档查了一圈,发现根本没有解决这种情况的方法

然后用ChatGPT给的几种方法自测了一下

  1. 测试ssh的22端口
1
ssh -T git@github.com

如果成功的话会返回Hi …
但是我没成功
2. 测试github的443端口

1
ssh -T -p 443 git@ssh.github.com

发现这个是通过了
3. 测试https是否能通

1
git ls-remote https://github.com/你的用户名/你的仓库名.git

发现不通

那结果就很显然了,我在_comfig.yml中把deploy的方法改为了

1
2
3
4
deploy:
type: git
repo: ssh://git@ssh.github.com:443/你的用户名/你的仓库名.git
branch: main

最后再来hexo三部曲,成功部署上去了

(不懂是不是网太差了,但是起码是解决了问题)

后续我应该还是会换hugo的,hexo的速度太慢了