我使用项目界面上的“点击部署”在Google Compute Engine上安装了GitLab。几分钟后,部署成功。我可以通过SSH登录到实例,并像预期的那样进行操作。
我还可以使用Web界面登录到GitLab,并将SSH密钥添加到我的个人资料中。目前为止,一切都很好。然而,当我尝试推送或拉取新的示例存储库时,我收到以下消息:
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我已经删除了本地的SSH配置文件以防止干扰。我是否需要设置某种类型的SSH隧道?我错过了什么吗?
更新:清除本地的~/.ssh文件夹并重新生成SSH密钥(我将其添加到GitLab配置文件中)会产生以下错误:
Received disconnect from {GITLAB_IP_ADDRESS}: 2: Too many authentication failures for git
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
更新2: 看起来GitLab可能已经有了解决方案:运行 sudo gitlab-ctl reconfigure
。请参见这里:https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#git-ssh-access-stops-working-on-selinux-enabled-systems
ssh-keygen -t rsa
命令,并将id_rsa.pub
文件复制到你的 GitLab 个人资料中?然后,以正确的访问权限将自己添加到项目中,以便拉取/推送代码? - ʰᵈˑ