GitLab拉取代码错误:no matching host key type found. Their offer: ssh-rsa,ssh-dss Could not read from re...

最近在家远程办公时,拉取公司代码时出现问题:
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

果然可以了

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容