问题描述
单位使用的版本控制工具,不是常用的gitLab,而是不太常见的Gitblit,一台新电脑,照着之前的流程配好SSH,装好git,然后拉代码,Idea发生了如下报错。
Unable to negotiate with 192.168.1.251 port 52100: no matching host key type found. Their offer: ssh-rsa,ssh-dss Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
看着问题是找不到匹配的主机密钥类型,后来想了想不对,查了下资料原因可能是新的ssh客户端不支持ssh-rsa算法,所以想到了刚装的git版本是 2.7.3
可能已经不支持了,虽然这个版本以及不算新的,但还是不支持,无奈也不想浪费时间在这种问题上。
解决方法
降低git版本,换回了2.25版本。拉取成功。
无奈。这个gitblit服务器还是有些问题的。