新ssh客户端不支持ssh-rsa算法问题
报错
Unable to negotiate with xxxxxxx port 22: no matching host key type found. Their offer: ssh-rsa
fatal: Could not read from remote repository.
解决办法
在 `C:\Users\xxx\.ssh` 中新建 config 文件,并在 config 中添加如下配置
Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa
ssh 密钥配置流程
- git config --global user.name "用户名"
- git config --global user.email "邮箱"
- ssh-keygen -t rsa -C "上面的用户名"
- C:\Users\xxx\.ssh中找到id_rsa.pub将公钥配置到对应的Git服务器里
- ssh -T git@github.com或者ssh -T git@对应的Git服务器