It's possible to have enough permissions to create a new project, but not enough permissions to push to the new repository
This just happened to me on GitLab.com: GitLab Enterprise Edition 11.5.0-rc10-ee
I have enough permissions to have managed to create https://gitlab.com/gitlab-org/labkit as an empty project.
I then tried to push, firstly to a branch then to master. Both times I got the same error.
$ git push origin
Enumerating objects: 645, done.
Counting objects: 100% (645/645), done.
Delta compression using up to 8 threads
Compressing objects: 100% (460/460), done.
Writing objects: 100% (645/645), 1.78 MiB | 25.98 MiB/s, done.
Total 645 (delta 150), reused 645 (delta 150)
remote: Resolving deltas: 100% (150/150), done.
remote: GitLab:
remote: A default branch (e.g. master) does not yet exist for gitlab-org/labkit
remote: Ask a project Owner or Maintainer to create a default branch:
remote:
remote: https://gitlab.com/gitlab-org/labkit/project_members
remote:
To gitlab.com:gitlab-org/labkit.git
I also tried to bypass this issue by creating a file through the web UI, but experienced the same issue.
Edited by Andrew Newdigate