【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。

相关推荐
@_@ prince @_@1 分钟前
Git 命令大全(带详细说明)
git·gitee·github·visual studio
念一不念二22 分钟前
【Git】命令行使用操作
git
念一不念二1 小时前
【vscode】Git的中好用的命令和技巧
git
带娃的IT创业者13 小时前
Git commands I run before reading any code
git·开发工具·版本控制·编程技巧·代码审查
九成宫14 小时前
Git 与远程仓库实操记录:克隆、配置、分支推送与问题排查
笔记·git·ssh
武超杰1 天前
Git 从入门到精通教程
git
程序员夏末1 天前
【开源经历 | 第一篇】参与开源需要掌握的Git和Github指令
git·开源
SNOWPIAOP1 天前
git status 出现中文乱码的解决方案等
git·乱码·postgres
qq_435287921 天前
第9章 夸父逐日与后羿射日:死循环与进程终止?十个太阳同时值班的并行冲突
java·开发语言·git·死循环·进程终止·并行冲突·夸父逐日
AIMath~2 天前
Git 子模块(Submodule)目录结构清除实战复盘
git