0


Error-Spawned-Hexo部署到Github问题解决


title: Error Spawned:Hexo部署到Github问题解决

date: 2024-01-31 15:49:51
tags: Hexo
typora-root-url: Error-Spawned-Hexo部署到Github问题解决

将Hexo博客部署到Github上常常会遇到报错:

FATAL Something’s wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
Error: Spawn failed
at ChildProcess. (E:\Blog\node_modules\hexo-deployer-git\node_modules\hexo-util\lib\spawn.js:51:21)
at ChildProcess.emit (node:events:514:28)
at cp.emit (E:\Blog\node_modules\cross-spawn\lib\enoent.js:34:29)
at ChildProcess._handle.onexit (node:internal/child_process:294:12)

网络上的一些解决办法时常失效,且治标不治本.

解决方法

是SSH密钥出现问题.

$ ssh -T git@github.com
ssh: connect to host github.com port 22: Connection timed out

Stackoverflow 中最高赞方法实测可行.

在这里插入图片描述

其中,

~/.ssh

路径为

C:\Users\username\.ssh

,于其中新建文件

config

即可. 笔者采用的是CSDN中给出的文件内容.

此后在终端输入

ssh -T [email protected]

会有prompt,肯定即可.

$ ssh -T git@github.com
The authenticity of host ‘[ssh.github.com]:443 ([20.205.243.160]:443)’ can’t be established.
ED25519 key fingerprint is PUBLICKEY.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added ‘[ssh.github.com]:443’ (ED25519) to the list of known hosts.
Hi NAME! You’ve successfully authenticated, but GitHub does not provide shell access.

大功告成.

标签: github

本文转载自: https://blog.csdn.net/hexufan/article/details/136119563
版权归原作者 hexufan 所有, 如有侵权,请联系我们删除。

“Error-Spawned-Hexo部署到Github问题解决”的评论:

还没有评论