美文网首页
hexo deploy 遇到ssh: connect to ho

hexo deploy 遇到ssh: connect to ho

作者: 牛年大吉2021 | 来源:发表于2024-01-29 19:16 被阅读0次

问题详情描述:
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
Error: Spawn failed
at ChildProcess.<anonymous> (D:\hexo\hexoRepo\node_modules\hexo-util\lib\spawn.js:51:21)
at ChildProcess.emit (events.js:400:28)
at ChildProcess.cp.emit (D:\hexo\hexoRepo\node_modules\cross-spawn\lib\enoent.js:34:29)
at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)
操作系统:windows10
解决方案:
(1) 检查Token是否过期;
(2) 配置Config 代理。 .ssh文件下面新建config文件,配置以下内容;

Host github.com      
     Hostname ssh.github.com                                                              
     Port 443                                                                              
    User git
   ProxyCommand connect -S 127.0.0.1:10809 %h %p

(3)上面配置不行,换成下面这种,应该是端口错误,默认的22不能用了,都改成443

Host github.com
User git
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443

相关文章

网友评论

      本文标题:hexo deploy 遇到ssh: connect to ho

      本文链接:https://www.haomeiwen.com/subject/hytnodtx.html