Cannot create repository in project

Hi there!

I’ve just installed a new copy of GitLab on my ArchLinux system, and, as far as I know, it all went okay except one thing: I cannot create a repository in a project.

When I create a project, I get presented with the “No repository” message, but when I click the “Create empty bare repository” button, it makes a POST request to /myproject/repository but it returns a 302 redirect to /myproject, without any extra message or information.

I’ve been searching a lot but I cannot find anything that could be causing this.

Any idea would be appreciated.


1 Like

I have the exact same issue and can’t find any relevant information about this.
This is the gitlab-rails/production.log output:

Started POST "/mygroup/myproject/repository" for MYIP at 2018-03-20 20:18:57 +0000
Processing by Projects::RepositoriesController#create as HTML
  Parameters: {"authenticity_token"=>"[FILTERED]", "namespace_id"=>"mygroup", "project_id"=>"mygroup"}
Redirected to http://MYIP/mygroup/myproject
Completed 302 Found in 226ms (ActiveRecord: 38.0ms)
Started GET "/mygroup/myproject" for MYIP at 2018-03-20 20:18:58 +0000
Processing by ProjectsController#show as HTML
  Parameters: {"namespace_id"=>"mygroup", "id"=>"myproject"}
Completed 200 OK in 5017ms (Views: 902.0ms | ActiveRecord: 38.8ms)

Did you check sudo gitlab-rake gitlab:check ? Everything looks fine there for me.
I think this issue might be the exact same issue why no repository is created for a new project.
I’d also appreciate any ideas!

hello, wild guessing:
the release from 10 days ago has a subtle bug, where the create project button disappears on the normal pages if you hit the personal forks limit. Then you only get the create project button inside a group where you have the permission to create projects.

I don’t think this is related to this issue. It is a fresh GitLab installation. The group was created by the same account as the project. It was the first project, so no limits should have been a problem there.

I think it throws this error because of a bad configuration of the repositories path. I have my path set to another folder different than the default.

The folder has the appropiate permissions and is owned by the gitlab user and group, but somehow it stills give errors. Gitlab successfully creates the project.git folder when I create a new project, but it isn’t able to create an empty bare repository.

Make sure that your Repository which is configured in the gitlab.yml is the same as in gitaly/config.toml
This fixed it in my case.

I think this isn’t the issue. There is a comment in gitaly/config.toml:

This file is managed by gitlab-ctl. Manual changes will be erased!
To change the contents below, edit /etc/gitlab/gitlab.rb

So what ever you put as a repository path in the gitlab.rb will be used as a repository path for gitaly.
Other than that, I think there is not gitlab.yml which you should edit anymore.

I kinda give up to setup GitLab on my Raspberry because of this issue. I’d appreciate any help.

Maybe it is a difference also in the versions. I have installed gitlab ce from source in Version 10.6.3.
There is also no gitlab-ctl command an no comment in the Gitaly configuration file as you explained.
I found only out, that my project and the wiki where created successfully, but then Gitaly was not able to initiate as empty bare git repo.
Because Gitaly had the false default repo path in the configuration.