I tested it again:
I can say:
I created a completly new project under my user account. Not under a group.
One time i tried to push over SSH and one time over HTTP.
Pushing over SSH didn’t work but under HTTP worked.
So it has to be something with SSH. Maybe some Ubuntu problem. But I don’t know where I can start with searching. Which logs? Which location?
Can you help me in this please?
So, now I could solve it by myself.
I have two accounts on my own GitLab instance: One for personal use (with root privileges) and one for university use.
My problem was that my ssh key was linked the personal account but I created the repository in the web UI under my university account.
For other users:
Check the output of the following command:
ssh -T git@gitlab_server
The output should be:
Welcome to GitLab, <username>!
So I created a new block in my
~/.ssh/config with following code:
IdentityFile <specific_ssh_key> (like ~/.ssh/id_rsa_foo>
Have fun with this solution!