GitLab拉取代码错误:no matching host ke

2022-11-20  本文已影响0人  MarkDev

最近在家远程办公时,拉取公司代码时出现问题:
Unable to negotiate with xx.xx.xx.xx port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss Could not read from remote repository.
试着使用ssh -T 命令连接了一下公司Git仓库,同样的问题。

image.png
上网搜索了一下,大概是因为RSA加密算法太弱了,不被GitLab识别,所以在.ssh/cconfig里重新配置了一下,添加了
HostKeyAlgorithms +ssh-rsa 
PubkeyAcceptedKeyTypes +ssh-rsa

果然可以了

上一篇 下一篇

猜你喜欢

热点阅读