Gitlab 存储库不存在问题



gitlab 存储库面临问题不可用。

访问项目表单 gitlab 页面时,它显示以下错误

No repository
The repository for this project does not exist. 
This means you can not push code until you create an empty repository or import existing one.

从下面的root登录检查项目详细信息时有问题

Project info:
Name: app
Namespace: Administrator
Owned by: Administrator
Created by: Administrator
Created on: May 20, 2016 9:08am
http: http://192.168.1.123/root/app.git
ssh: gitlab@192.168.1.123:root/app.git
repository: does not exist
access:  Private

后来在以下路径下签入了 gitlab 文件系统

root@root:/var/opt/gitlab/git-data/repositories/root/app.git#

存在,文件夹大小为 3 MB,应相同。

当检查 ssh 访问权限时,我能够克隆项目,但推送到项目不起作用并显示以下错误

Pushing to gitlab@192.168.1.123:root/app.git
GitLab: A repository for this project does not exist yet.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

当在 gitlab 机器中检查并检查"gitlab-rails dbconsole"时能够登录并检查具有上述应用程序项目的项目表,它存在良好。

需要帮助解决项目路径问题未正确指向。下面是另一个项目的示例输出,该项目显示了正确的项目详细信息。

Name: newname
Namespace: Administrator
Owned by: Administrator
Created by: Administrator
Created on: Sep 14, 2017 12:03pm
http: http://192.168.1.123/root/newname.git
ssh: gitlab@192.168.1.123:root/newname.git
fs: /var/opt/gitlab/git-data/repositories/root/newname.git
Size 0.2 MB
last commit: 5 months ago
access:  Private

在这种情况下,存储库确实存在于服务器上,它可能是一个过时的缓存:

sudo gitlab-rake cache:clear

您还应确认存储库存储中的文件归git用户和组所有:

sudo chown -R git:git /var/opt/gitlab/git-data/repositories

此外,尽管在 2018 年提出这个问题时这不是问题,但由于罕见的边缘情况,在将遗留的 GitLab git 存储库迁移到散列存储后,它可能会再次出现。在这种情况下,有一个 GitLab 支持代码段,当 GitLab 在其预迁移位置查找存储库时,它可以帮助诊断和修复。

最新更新