mac升级系统(13.1)后使用git报错

398 阅读1分钟

错误信息

Unable to negotiate with 118.31.165.50 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.

解决方法

1 进入ssh目录 cd ~/.ssh
2 创建config文件 touch config
3 编辑config文件内容 open config
4 复制以下内容到第三步骤
    Host *  
    HostkeyAlgorithms +ssh-rsa  
    PubkeyAcceptedKeyTypes +ssh-rsa
5 保存