gpt4 book ai didi

Gitlab key 格式问题

转载 作者:IT王子 更新时间:2023-10-29 00:39:40 26 4
gpt4 key购买 nike

我遇到了一个奇怪的情况,我正在使用 gitlab 帐户来处理我的代码。我正在使用 ssh 协议(protocol)访问存储库。我能够提取代码,但在尝试推送代码时收到以下错误。这对我来说可能是愚蠢的。但是我将 key 存储在我的 gitlab 配置文件中并且能够使用它来提取代码

错误:

$ git push origin master
key_load_public: invalid format
Enter passphrase for key '/c/Users/username/.ssh/id_rsa':
Access denied.
fatal: Could not read from remote repository.

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

最佳答案

我终于解决了这个问题,我将它发布给其他用户。如果 putty 生成的 key 无法帮助您访问 gitlab 存储库,请尝试使用命令 ssh-keygengitbash 终端生成 key 并将文件保存在您用户帐户的 .ssh 文件夹中。

linux 风格的 key 生成让我的生活变得轻松,因为我试图在 windows 环境中使用 putty keygen 生成 key 。

希望这对某人有帮助。

关于Gitlab key 格式问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33302130/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com