0%

解决 Hexo d 突然报错问题

时隔四五个月,今天往 hexo 推了篇文章,结果走到 hexo d 时竟然报错了

1
2
3
4
5
6
7
8
9
10
11
fatal: unable to access 'https://github.com/【******】/【*****】.github.io.git/': OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054
FATAL {
err: Error: Spawn failed
at ChildProcess.<anonymous> (D:\hexo\blog\node_modules\_hexo-util@1.9.1@hexo-util\lib\spawn.js:51:21)
at ChildProcess.emit (events.js:314:20)
at ChildProcess.cp.emit (D:\hexo\blog\node_modules\_cross-spawn@7.0.3@cross-spawn\lib\enoent.js:34:29)
at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) {
code: 128
}
} Something's wrong. Maybe you can find the solution here: %s https://hexo.io/docs/troubleshooting.html

然后网上查了好长时间,原因貌似是 2021 年 8 月 13 日 github 不再支持密码验证,而使用了 token,然后解决上述问题的具体步骤是:
1、登录 github 申请 token,点击个人头像进入 settingimage.png

2、接着找到 Developer settingsimage.png

3、然后进入 personnel access tokens 中image.png

4、点击 image.png

5、image.png

6、接着打开你个人 hexo 里面的这个配置文件
image.png
7、把 deploy 里的 repo 地址改成这个格式(这样做不知道安不安全?)
image.png

8、然后重新
hexo clean
hexo g
hexo d
应该就能解决问题了