hexo d时kex_exchange_identification: Connection closed by remote host

现象:仅hexo d与ssh时会报错,git正常

错误信息:

1
2
3
kex_exchange_identification: Connection closed by remote host
Connection closed by UNKNOWN port 65535
fatal: Could not read from remote repository.

在注释掉.ssh/config里的这些后,变成了port 22

1
2
3
Host github.com
User git
ProxyCommand connect -H 127.0.0.1:7890 %h %p

解决方法:Error while hexo d: kex_exchange_identification: connection closed by remote host_普通读者的博客-CSDN博客

modify the file ~/.ssh/config

1
2
3
4
Host github.com
Hostname ssh.github.com
Port 443
User git

Reference

https://docs.github.com/en/authentication/troubleshooting-ssh/using-ssh-over-the-https-port