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
相关推荐
道亦无名26 分钟前
Linux下是STM32的编译修改配置文件tensorflow
linux·运维
Azure DevOps28 分钟前
Azure DevOps Server:2026年3月份补丁
运维·microsoft·azure·devops
wanhengidc7 小时前
云手机的运行环境如何
运维·服务器·游戏·智能手机·生活
cyber_两只龙宝7 小时前
【Haproxy】Haproxy的算法详解及配置
linux·运维·服务器·云原生·负载均衡·haproxy·调度算法
阿常呓语7 小时前
Linux命令 jq详解
linux·运维·shell·jq
Tipriest_9 小时前
git reflog介绍(找回之前detach后做的commit)
git
火车叼位9 小时前
Docker Compose 网络原理与实战:同一 Compose 服务间如何稳定通信
运维·docker·容器
一个有温度的技术博主10 小时前
Git系列四:git的基本概念
git
白狐_79811 小时前
从零构建飞书 × OpenClaw 自动化情报站(三)
运维·自动化·飞书
饕餮争锋12 小时前
git常见场景对应的命令
git