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 git@github.com

会有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.

大功告成.

  • 11
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值