In Fedora 33, git operations with ssh id_rsa file fail on GitLab.com

点点圈 提交于 2021-01-28 07:12:19

问题


Since I've installed Fedora 33, any git operation with GitLab.com (and with a different symptom, azure) fail. On GitLab.com I get:

git@gitlab.com: Permission denied (publickey,keyboard-interactive).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Azure simply asks for password without showing any errors.


回答1:


As suggested in here, the fix for gitlab is to save these lines in ~/.ssh/config file:

Host gitlab.com
    HostName gitlab.com
    PreferredAuthentications publickey
    IdentityFile ~/.ssh/id_rsa
    PubkeyAcceptedKeyTypes=+ssh-rsa

For Azure, change both occurrences of gitlab.com to ssh.dev.azure.com



来源:https://stackoverflow.com/questions/65007311/in-fedora-33-git-operations-with-ssh-id-rsa-file-fail-on-gitlab-com

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!