ssh: connect to host ssh.github.

2020-02-11  本文已影响0人  __jy

已经反复多次遇到这个问题


image.png

如何解决

【前提进入当前文件目录下!!!而非根目录】
输入命令 vim ~/.ssh/config

Host github.com
User YourEmail@xx.com
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443

  1. ia 进入编辑模式
  2. 复制上面
  3. esc退出编辑
  4. :wq保存退出

输入命令 ssh -T git@github.com

image.png

成功!

上一篇 下一篇

猜你喜欢

热点阅读