git - 在 Fedora 33 中,使用 ssh id_rsa 文件的 git 操作在 GitLab.com 上失败
问题描述
由于我安装了 Fedora 33,任何使用 GitLab.com 的 git 操作(以及不同的症状,天蓝色)都会失败。在 GitLab.com 上,我得到:
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 只要求输入密码,而不会显示任何错误。
解决方案
正如这里所建议的, gitlab 的修复方法是将这些行保存在~/.ssh/config
文件中:
Host gitlab.com
HostName gitlab.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
PubkeyAcceptedKeyTypes=+ssh-rsa
对于 Azure,将出现的两个更改gitlab.com
为ssh.dev.azure.com
推荐阅读
- python - groupby.shift 时的性能问题
- macos - 在 Mac 上默认启用 Chrome 上的远程调试?
- python - 如何在测试中伪造 Popen?
- apache-kafka - KafkaProducer.close() 和 KafkaProducer.flush() 的区别
- android - 设备是否应该在电池测试期间表现得好像什么都没发生?
- google-chrome - Chrome DevTools Network 标签中的“transferred”和“resources”有什么区别?
- javascript - 如何以角度解决此路线问题?
- python-2.7 - 使用 AWS Lambda 将 S3 存储桶链接到 DynamoDB
- c++ - 发送数据 lwip STM32 PC
- python - 在 Visual Studio 代码上运行 ev3 mindstorms 的问题