Git 异常处理:SSH 端口 22 连接超时

ssh:connect to host github.com port 22: Connection timed out

鼠标右键 >> Git Bash Here

进入 .ssh 文件夹

cd ~/.ssh

创建一个 config 文件

不会使用 vim 的可以直接创建一个记事本文件,输入内容后,去掉记事本后缀名。 

vim config

插入下面的内容

Host github.com
User “你的电子邮箱”
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_ecdsa
Port 443

 保存 vim 并退出

:wq

 

posted @ 2022-09-26 14:42  2324736194  阅读(528)  评论(0编辑  收藏  举报