完成公钥登记,任然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 



  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值