错误信息如下:
命令: git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks ls-remote git@git.weixin.qq.com:***/***.git
输出:
错误: Unable to negotiate with 118.89.100.150 port 22: no matching host key type found. Their offer: ssh-rsa
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
经查阅资料发现是新的ssh客户端不支持ssh-rsa 算法,需要修改本地配置后重新使用ssh-rsa算法。
具体在当前用户目录下的.ssh文件夹中创建config文件,注意无扩展名,输入如下代码保存即可。
Host *
HostKeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa
这样就访问成功了。
附sourceTree的ssh配置方法。
ssh密钥生成方法,可以百度。
微信代码平台托管后台要添加好新的公钥
如zero就是我添加的新的公钥(isa_pub)