关于ssh连接主机git连接github失败的问题

本地git连接github出现错误:

连接出现错误:

>ssh [email protected]
ssh: connect to host github.com port 22: Connection refused

在公钥/私钥所在目录添加config文件:

Host github.com
User [email protected]
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443

[email protected]输入自己的github账号
重新输入指令测试是否连接

D:\path>ssh [email protected]
The authenticity of host '[ssh.github.com]:XXX ([XXX.XXX.XXX.XXX]:XXX)' can't be established.
RSA key fingerprint is XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '<

你可能感兴趣的:(笔记)