I am not able to push code to GitLab for the first time.
I have created a Gitlab project on the web interface.
I have created an ASP MVC project.
I did "git init
" in that directory.
I added remote origin
.
I added and committed the changes and then, when I want to push the changes to remote I get the following error:
remote: A default branch (e.g. master) does not yet exist for
...
remote: Ask a project Owner or Maintainer to create a default branch:
...
error: failed to push some refs to
So I want to know if I can create a branch with the role Developer
?
If yes how to create a default branch?
If no, what should my next steps be?
When you create a new project, GitLab sets master as the default branch for your project. You can choose another branch to be your project's default under your project's Settings > General.
The default branch name in Git is master . As you start making commits, you're given a master branch that points to the last commit you made.
This is followed by issue 54155
It seems as though 'developer' should not be able to create projects if it does not have permission to then populate that project without asking an admin to intervene.
I don't understand, why I have enough permissions to create a project, but not to make it ready enough so I can push into it, and need to use another persons time in my organization to get ready to work.
IMHO it would be logical to either allow users with status developer to create a project in a way that it's ready to push code to - or just don't let developers create a project and tell them they have to ask a maintainer or owner.
Issue 51688 mentions:
Then I have to login with gitlab admin admin...Aggregate access to user test to test6.git as a
dev
ormaintainer
... and finally I can make push... But if usertest
creates another repo, I have to repeat all these steps again....Maintainer can create new branch. Please use maintainer account to push the new project.
But it doesn't make sense that a user has permissions to create empty repositories but not initialize a default branch or push to their newly created repository.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With