当前位置: 首页 > news >正文

git报错Add correct host key

想克隆备份的笔记库,失败。
测试连接github报错如下。

$ ssh -T git@github.com
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@       WARNING: POSSIBLE DNS SPOOFING DETECTED!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The RSA host key for github.com has changed,
and the key for the corresponding IP address 140.82.121.4
is unknown. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 xxx/.ssh/known_hosts to get rid of this message.
Offending RSA key in xxx/.ssh/known_hosts:8
RSA host key for github.com has changed and you have requested strict checking.
Host key verification failed.

在issue中搜到了相关问题,给出的解释是因为升级了ssh-key。
按照官方提示,在known_hosts文件中删去了github的rsa。

执行下面的命令,也可以手动删,之前自己配置的别的ip也要删。

ssh-keygen -R github.com

随后在known_hosts 文件中手动添加报错中提示的ip地址和github的公钥。(就是修改hosts文件配置的github解析ip),之后尝试ssh连接,一路yes即可成功连接github。

http://www.lryc.cn/news/130309.html

相关文章:

  • Kvm配置ovs网桥
  • AraNet:面向阿拉伯社交媒体的新深度学习工具包
  • P13-CNN学习1.3-ResNet(神之一手~)
  • 【C++】set/multiset容器
  • docker拉取镜像时报错Error response from daemon: Head ““no basic auth credentials
  • Redis消息传递:发布订阅模式详解
  • 最强自动化测试框架Playwright(36)- 句柄
  • 推荐一个绘图平台(可替代Visio)
  • 【探索Linux】—— 强大的命令行工具 P.6(调试器-gdb、项目自动化构建工具-make/Makefile)
  • echarts-convert.js使用
  • 数据结构之队列详解(包含例题)
  • Prometheus的搭建与使用
  • 实战指南,SpringBoot + Mybatis 如何对接多数据源
  • 论文阅读——Imperceptible Adversarial Attack via Invertible Neural Networks
  • List和ObservableCollection和ListBinding在MVVM模式下的对比
  • insightface安装过程中提示 Microsoft Visual C++ 14.0 or greater is required.
  • mongodb数据库
  • OpenCV-Python中的图像处理-图像特征
  • Ajax入门+aixos+HTTP协议
  • conda创建虚拟环境
  • Golang服务的请求调度
  • Jenkins的流水线启动jar后未执行问题处理
  • 智慧工地平台工地人员管理系统 可视化大数据智能云平台源码
  • 外包干了2个月测试,技术退步明显...
  • 神经网络基础-神经网络补充概念-19-向量化实现的解释
  • 四层和七层负载均衡的区别
  • Scala 如何调试隐式转换--隐式转换代码的显示展示
  • Rust交叉编译简述 —— Arm
  • 算法与数据结构(二十三)动态规划设计:最长递增子序列
  • 相机的位姿在地固坐标系ECEF和ENU坐标系的转换