最近在家遠(yuǎn)程辦公時,拉取公司代碼時出現(xiàn)問題:
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
上網(wǎng)搜索了一下,大概是因為RSA加密算法太弱了,不被GitLab識別,所以在.ssh/cconfig里重新配置了一下,添加了
HostKeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa
果然可以了