git无法使用git协议clone github仓库问题解决

$ git clone git@github.com:ConnectAI-E/Feishu-OpenAI.git

提示错误:

正克隆到 'Feishu-OpenAI'...
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:uNiVztksCsDhcc0u9e8BujQXVUpKZIDTMczCvj3tD2s.
Please contact your system administrator.
Add correct host key in /Users/tangwan/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/tangwan/.ssh/known_hosts:33
Host key for github.com has changed and you have requested strict checking.
Host key verification failed.
致命错误:无法读取远程仓库。

请确认您有正确的访问权限并且仓库存在。

首先登录github账号,检查本机的 ~/.ssh/id_rsa.pub 是否添加到github账号

https://github.com/settings/keys

如果没有添加,需要先添加本机的ssh公钥到github

然后再重试 git clone 

如果依然报错,需要检查 ~/.ssh/known_hosts  ,找到github.com开头的行,然后删除

再次重试 git clone

此时提示需要验证key,输入yes后就开始正常clone了

➜  /opt git clone git@github.com:ConnectAI-E/Feishu-OpenAI.git
正克隆到 'Feishu-OpenAI'...
The authenticity of host 'github.com (20.205.243.166)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
remote: Enumerating objects: 1793, done.
remote: Counting objects: 100% (492/492), done.
remote: Compressing objects: 100% (158/158), done.
remote: Total 1793 (delta 392), reused 365 (delta 333), pack-reused 1301
接收对象中: 100% (1793/1793), 15.66 MiB | 2.11 MiB/s, 完成.
处理 delta 中: 100% (1077/1077), 完成.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值