新搭建开发环境,git clone
项目时报错:
Git error: no matching host key type found. Their offer: ssh-rsa
Windows 的修改SSH配置文件
(1)
需要修改的文件是 ssh_config 文件,该文件的存放位置涉及到你安装的git目录,我的安装目录为 C:\Program Files\Git\etc\ssh
,
(2)
管理员模式打开记事本,然后打开该文件,在末尾添加
Host *
KexAlgorithms +diffie-hellman-group1-sha1
HostkeyAlgorithms +ssh-dss,ssh-rsa
PubkeyAcceptedKeyTypes +ssh-dss,ssh-rsa
问题解决!
接下来 git clone
就可以啦。