Hello,
I’m testing a local GitLab Community Edition [14.0.1] installation on an Ubuntu 20.04 system and ran into the following problem.
-
I created a blank project in gitlab using the gitlab user interface.
-
In my home directory on Ubuntu I created a git repository and populated it with some files.
$ mkdir great-test-project
$ cd great-test-project
$ git init
$ vi README.md
#####-First test-########
$ git add README.md
$ git commit -m “Initial commit”
- I pushed the local git repository to the earlier created empty gitlab repository
$ git remote add origin git@gitlab1.vhel.invalid:vhelmont/great-test-project.git
$ git push -u origin master
-
I created an issue in the newly created gitlab project using the gitlab user interface.
-
In the local git repository on my Ubuntu home directory, I created a branch to fix the issue, adjusted a file, performed a git add and a git commit
$ git checkout -b problem_fix
$ vi README.md
#####-First test-########
#####-Problem fix-########
$ git add README.md
$ git commit -m “Fix commit”
-
Then I tried to push the “problem_fix” branch to the gitlab repository and start a merge request
-
The push failed with the error message:
$ git push -u origin problem_fix
error: src refspec problem_fix does not match any
error: failed to push some refs to ‘git@gitlab1.vhel.invalid:vhelmont/great-test-project.git’
$
Any idea what I did wrong?
Regards,
Albert