Developer can't push to new repo

A user with Developer permission on a Group can't push to a new repo in the Group using the Push to create a new repo feature.

How to reproduce:

  • Create a group
  • Create a user with Developer access to that Group
  • Create a local project

Then do this:

git push https://gitlab.com/fpotter/examples/create-project-from-push-2.git master

Enter the username and password for the Deveoper-level user, then you get:

Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 4 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 299 bytes | 299.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: GitLab:
remote: A default branch (e.g. master) does not yet exist for fpotter/examples/create-project-from-push-2
remote: Ask a project Owner or Maintainer to create a default branch:
remote:
remote:   https://gitlab.com/fpotter/examples/create-project-from-push-2/-/project_members
remote:
To https://gitlab.com/fpotter/examples/create-project-from-push-2.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://gitlab.com/fpotter/examples/create-project-from-push-2.git'

There doesn't appear to be any way for the user to push to that project at this point.

If this is expected behavior, then maybe we should update the documentation and the output.

/cc @danielgruesso @cupini

Assignee Loading
Time tracking Loading