Ubuntu下使用git获取代码仓库,在已经拥有仓库访问权限且仓库存在的情况下提示The authenticity of host ‘***‘can‘t be established.

本文介绍了如何通过修改SSH配置文件,快速解决git clone操作时遇到的问题,只需添加 StrictHostKeyChecking no 和 UserKnownHostsFile /dev/null 即可顺利克隆代码。
git clone失败

在这里插入图片描述
解决方法:

修改/etc/ssh/ssh_config文件的配置,在文件中添加两行代码即可

StrictHostKeyChecking no
UserKnownHostsFile /dev/null

重新使用git clone 即可成功克隆代码

richard@ubuntu:~/桌面/dog_sys/cyberdog_ws$ vcs import . < cyberdog.repos At least one hostname (github.com) is unknown, switching to a single worker to allow interactively answering the ssh question to confirm the fingerprint The authenticity of host 'github.com (20.205.243.166)' can't be established. ECDSA key fingerprint is SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes EEEEEEEEE === ./bridges (git) === Could not determine ref type of version: Warning: Permanently added 'github.com,20.205.243.166' (ECDSA) to the list of known hosts. git@github.com: Permission denied (publickey). fatal: 无法读取远程仓库。 请确认您有正确的访问权限仓库存在。 === ./cyberdog_nav2 (git) === Could not determine ref type of version: git@github.com: Permission denied (publickey). fatal: 无法读取远程仓库。 请确认您有正确的访问权限仓库存在。 === ./cyberdog_tracking_base (git) === Could not determine ref type of version: git@github.com: Permission denied (publickey). fatal: 无法读取远程仓库。 请确认您有正确的访问权限仓库存在。 === ./devices (git) === Could not determine ref type of version: git@github.com: Permission denied (publickey). fatal: 无法读取远程仓库。 请确认您有正确的访问权限仓库存在。 === ./interaction (git) === Could not determine ref type of version: git@github.com: Permission denied (publickey). fatal: 无法读取远程仓库。 请确认您有正确的访问权限仓库存在。 === ./manager (git) === Could not determine ref type of version: git@github.com: Permission denied (publickey). fatal: 无法读取远程仓库。 请确认您有正确的访问权限仓库存在。 === ./motion (git) === Could not determine ref type of version: git@github.com: Permission denied (publickey). fatal: 无法读取远程仓库。 请确认您有正确的访问权限仓库存在。 === ./sensors (git) === Could not determine ref type of version: git@github.com: Permission denied (publickey). fatal: 无法读取远程仓库。 请确认您有正确的访问权限仓库存在。 === ./utils (git) === Could not determine ref type of version: git@github.com: Permission denied (publickey). fatal: 无法读取远程仓库。 请确认您有正确的访问权限仓库存在。 richard@ubuntu:~/桌面/dog_sys/cyberdog_ws$
最新发布
03-27
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值