hexo deploy 遇到ssh: connect to host github.com port 22: Connection timed out

问题详情描述:
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
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容