完成公钥登记,任然git clone 不下来代码

user@user-virtual-machine:~/program/aliyun$ git clone git@git.******.git
Cloning into 'your project...

The authenticity of host '**********' can't be established.                                                        

RSA key fingerprint is cc:fb:43:c8:da:60:8b:c4:b7:f2:3d:4a:7e:77:bc:5f.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '*************' (RSA) to the list of known hosts.
Agent admitted failure to sign using the key.

youracount******** password: 



出现:The authenticity of host '**********' can't be established.              可通过下面两种方式来解决:

1. 使用ssh连接远程主机时加上“-o StrictHostKeyChecking=no”的选项,如下:

View Code BASH
1
ssh  -o StrictHostKeyChecking=no  192.168.xxx.xxx

2. 一个彻底去掉这个提示的方法是,修改/etc/ssh/ssh_config文件(或$HOME/.ssh/config)中的配置,添加如下两行配置:

View Code BASH
1
2
StrictHostKeyChecking no
UserKnownHostsFile /dev/null

修改好配置后,重新启动sshd服务即可,命令为:/etc/init.d/sshd restart (或 service sshd restart )



出现Agent admitted failure to sign using the key. 可通过下面这条命令来解决:

解決方式 使用 ssh-add 指令将私钥 加进来 (根据个人的密匙命名不同更改 id_rsa)
# ssh-add   ~/.ssh/id_rsa 



你可能感兴趣的:(linux开发环境)