1.报错大致内容:
git@gitee.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
2.原因分析:
openssh高版本默认禁止ssh-rsa加密算法
3.解决方法:
linux:
1)vim /etc/ssh/ssh_config
2)添加以下内容:
Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa
windows:
1)在.ssh文件夹中创建config
2)添加以下内容:
Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa