【问题标题】:Gitlab ssh is enabled but no longer allows clone/push/etcGitlab ssh 已启用但不再允许克隆/推送/等
【发布时间】:2020-12-05 04:10:26
【问题描述】:

直到最近,我才能够通过 SSH 推送到 GitLab。我们更改了许多配置内容,因此我在找出问题所在时遇到了问题。最大的变化是我现在使用 VPN,项目更改了所有者,并且 IP 受到限制。我感觉这与 IP 限制有关。

ssh -T git@gitlab.com 打印 Welcome to GitLab, @myUsername! 所以 ssh 连接正常

但是,如果我尝试克隆、推送等,它会失败并出现各种错误(在下面添加),但最终会显示 Please make sure you have the correct access rights and the repository exists

我尝试了各种方法(在下面添加),主要是根据我找到的其他答案修改遥控器以在各种能力中使用我的用户名。它们都不起作用。 我可以通过 https 推送/克隆

我需要在 gitlab 中设置一个 IP 还是我需要设置的其他配置?

我尝试过的一些事情:

git remote add origin git@myUsername.gitlab.com:companyName/projectName.git

git remote add origin git@gitlab.com:companyName/projectName.git

git remote add origin myUsername@gitlab.com:companyName/projectName.git

及其对应的错误:

ssh: Could not resolve hostname myUsername.gitlab.com: Name or service not known
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
remote: 
remote: ========================================================================
remote: 
remote: The project you were looking for could not be found.
remote: 
remote: ========================================================================
remote: 
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
myUsername@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.

【问题讨论】:

  • “它因各种错误而失败”和“我尝试了各种事情”是相当无用的 :( 建议:启用 GitLab 详细日志记录:docs.gitlab.com/ee/administration/logs.html
  • 你说得对,我在帖子中添加了错误。我会尝试详细记录 ty。

标签: git ssh gitlab


【解决方案1】:

建议:

【讨论】:

    猜你喜欢
    • 2023-03-04
    • 1970-01-01
    • 2017-11-23
    • 1970-01-01
    • 2019-05-28
    • 1970-01-01
    • 2017-01-05
    • 2014-05-06
    相关资源
    最近更新 更多