The authenticity of host ‘‘ can‘t be established.

git pull(ssh协议)远程分支 报 The authenticity of host ‘xxx’ can’t be established. (window)

错误效果

The authenticity of host 'XXXXX' can't be established.
ECDSA key fingerprint is SHA256:eoLmXa/HGnUXDPFfNQHeqLeyzUbpzVJTvTWluSZfgsiyT8.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

排查过程

$ cd ~/.ssh
$ ll
total 9
-rw-r--r-- 1 a9665 197609 1675  3月 25  2019 id_rsa
-rw-r--r-- 1 a9665 197609  401  3月 25  2019 id_rsa.pub
-rw-r--r-- 1 a9665 197609 1280  4月 17 22:57 known_hosts

疑问:通过 进入ssh 目录发现 有三个文件 id_rsa.pub 已经配置到gitlib 里面了,公私钥也是一对但还是报错,网上查了说所以没有 known_hosts 文件,但我的明显有

解决:删掉known_hosts 重新执行 git clone 分支

The authenticity of host 'XXXXX' can't be established.
ECDSA key fingerprint is SHA256:eoLmXa/HGnUXDPFfNQHeqLeyzUbpzVJTvTWluSZfgsiyT8.
Are you sure you want to continue connecting (yes/no/[fingerprint])?

这个地方切记一定要输入 yes,直接按enter键 不然是不能生成known_hosts,正常pull 代码下来的

结果:代码 pull 成功

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值