我在工作中使用我的项目,但我想在家与他一起工作,因为我可以登录我的家用机器来处理我的项目。
但是,在家里,我看到以下消息:
The authenticity of host 'github.com (ip)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)?
Run Code Online (Sandbox Code Playgroud)
我怎样才能克服它?
我试图从我新安装的linux机器上运行带有fluxbox的manjaro,在github上克隆我的一个存储库.我设置了user.name和user.email并上传了正确的ssh密钥.但我总是得到
The authenticity of host 'github.com (192.30.252.129)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)?
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Run Code Online (Sandbox Code Playgroud)
我google了它,发现我应该做的ssh-keygen -R github.com应该从我的known_hosts文件中删除github但是known_hosts文件还没有存在,因为我刚刚完成了一个新的linux安装.
所以我试过ssh -vT git@github给了我
ssh -vT git@github.com
OpenSSH_7.1p1, OpenSSL 1.0.2d 9 Jul 2015
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to github.com [192.30.252.128] port 22.
debug1: …Run Code Online (Sandbox Code Playgroud) 我已经生成了ssh密钥.
结果是:
Your identification has been saved in /home/rajani/.ssh/id_rsa.
Your public key has been saved in /home/rajani/.ssh/id_rsa.pub.
Run Code Online (Sandbox Code Playgroud)
密钥是十六进制格式,但在将其添加到GitHub时,我收到如下错误:
Key is invalid.
It must begin with 'ssh-rsa' or 'ssh-dss'.
Check that you're copying the public half of the key .
Run Code Online (Sandbox Code Playgroud)
我应该如何正确地将一个ssh密钥添加到GitHub?