问题详情描述:
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