为什么更新Gitlab后无法将更改推送到存储库?

问题描述 投票:1回答:1

将Gitlab从12.2.1更新到12.4.0之后,我无法将更改推送到存储库中。任何分支机构都存在此问题。

这是我尝试推送时的输出:

remote: GitLab: This action cannot be performed by internal users
To git.repo.com:repo/main-websites/repo.com.git
 ! [remote rejected] branch -> branch (pre-receive hook declined)
error: failed to push some refs to '[email protected]:repo/main-websites/repo.com.git'

我尝试了以下操作:

  • 重新配置/重启Gitlab
  • 删除我的本地副本并从头克隆它,我能够毫无问题地拉出项目,但无法推送。
  • 我试图从另一台机器上进行更改,那里也有同样的故事。
  • 我试图从Gitlab删除我的SSH密钥并重新生成它,但是它也没有帮助。

这是我发现的唯一与此问题相关的日志

{
    "method":"POST",
    "url":"http://127.0.0.1:8080/api/v4/internal/allowed",
    "code":"401",
    "body":"{
        "status":false,
        "message":"This action cannot be performed by internal users"
    }",
    "pid":17255,
    "level":"error",
    "msg":"Call failed",
    "time":"2019-10-23T13:55:33+00:00"
}

由于我完全被困在这里,将不胜感激任何可能导致它的想法。

谢谢!

git gitlab push git-push
1个回答
0
投票

显然,GitLab实例上带有密钥的文件已损坏。

我已通过以下方式修复它:

  • 我删除了文件:/var/opt/gitlab/.ssh/authorized_keys
  • 已从GitLab Web UI删除所有SSH密钥
  • 重新添加键

现在可以正常使用...

在这里找到解决方案:https://stackoverflow.com/a/18047860/1544230

© www.soinside.com 2019 - 2024. All rights reserved.