Cane's Blog

Cane

【Problem】Git报错,解决 Unable to negotiate with **** port 22: no matching host key type found.

50
2022-03-01

问题描述

Git SSH 已经添加密钥,仓库地址无误,但是 Push 的时候报错

提示 Unable to negotiate with **** port 22: no matching host key type found. Their offer: ssh-rsa

截图

...

解决方案

.ssh 文件夹里,新建 config 文件

Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa

2022-02-25-16-19-36.png