ssh clone报错:no matching host key type found. Their offer: ssh-rsa

1 现象

升级了MacOS以后,git不能用了,重新配置了idea的git配置

无法拉取代码,重新拉取报错

2 原因

是因为OpenSSH 8.8以后的版本禁止使用 SHA-1 哈西算法的 RSA 签名

https://www.openssh.com/txt/release-8.8

3 解决

我是mac电脑。使用 vim ~/.ssh/config

sh 复制代码
Host icode.baidu.com
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa

windows 使用 vim ~/.ssh/config 如下

sh 复制代码
Host icode.baidu.com
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedkeyTypes +ssh-rsa
相关推荐
wj3055853782 小时前
CC-Switch 在 WSL Ubuntu 中安装记录
linux·运维·ubuntu
人生匆匆2 小时前
通过nginx解决跨域问题
运维·nginx
原来是猿3 小时前
【Socket编程预备知识】
linux·运维·服务器·网络
吴爃3 小时前
Spring Boot 项目在 K8S 中的打包、部署与运维发布实践
运维·spring boot·kubernetes
Elastic 中国社区官方博客3 小时前
在 Elastic 中使用 MCP 自动化用户旅程以进行合成监控
大数据·运维·人工智能·elasticsearch·搜索引擎·自动化·可用性测试
长安链开源社区3 小时前
学者观察 | 基于区块链的隐私计算技术——北京理工大学教授祝烈煌
运维·区块链
learning-striving3 小时前
Ubuntu26.04下载安装教程
运维·服务器·vmware·虚拟机
码上行动 664 小时前
用U盘制作系统盘以及如何装系统
运维
invicinble4 小时前
关于搭建运维监控系统(Prometheus+Grafana)
运维·grafana·prometheus
__beginner__4 小时前
CentOS 磁盘占用异常排查与处理手册(df 高、du/ncdu 低)
linux·运维·centos