【Git】Git配置 — 首次clone失败,出现报错:authenticity can‘t be established

项目场景:

在新安装的Ubuntu系统里使用git clone 项目


问题描述

安装完git,且已生成ssh秘钥,使用git clone 命令下载项目,出现了报错:

c 复制代码
AAA@pc-63:~/workspace/test$ git clone -b develop ssh://git@192.168.4.11/simulator/project.git
Cloning into 'project'...
The authenticity of host '[192.168.4.11]:2200 ([192.168.4.11]:2200)' can't be established.
ED25519 key fingerprint is SHA256:Mk3FECUgTt4dCOPbSieB1i6/yrWzk1HNflQYju8NF0M.
This key is not known by any other names
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.

原因分析:

.ssh文件夹下缺少known_hosts文件


而实际应该是:

解决方案:

在出现"Are you sure you want to continue connecting ", 要选择yes。此时就可以正常clone。

相关推荐
唐叔在学习21 分钟前
听说有老哥分不清Git branch和tag?这不看看嘛
git·后端
雁于飞10 小时前
vscode中使用git、githup的基操
笔记·git·vscode·学习·elasticsearch·gitee·github
小毛驴85021 小时前
所有微服务部署都使用一个git地址,并且通过docker部署各个服务的情况下,如何编写mvn指令来处理各个服务。
git·docker·微服务
国王不在家21 小时前
git 切换仓库后清理分支缓存
git
柯南二号1 天前
【Gitlab】Ubuntu 20.04服务器部署Gitlab
git·gitlab
phac1231 天前
git 如何直接拉去远程仓库的内容且忽略本地与远端不一致的commit
大数据·git·elasticsearch
ficker132 天前
git常用命令
git
kevin_cat2 天前
微信群机器人-备份文件发送通知
git·bash·企业微信
程序媛Dev2 天前
50.4k Star!我用这个神器,在五分钟内搭建了一个私有 Git 服务器!
运维·服务器·git
澈轩2 天前
Git 用得好,下班走得早
git