Can't push anything when using SSH on a new project

Hello,

when I am creating a new project in my own GitLab instance, I can’t push to it over SSH.

This message is displayed in console:
“(…) remote: GitLab: You are not allowed to push code to protected branches on this project. (…)”

I have the newest version of Omnibus Package on my Ubuntu 14.04. Can you tell me please, where I should look? Logs, Verbose commands etc.?

Greets.

You can’t push to your master branch, try with a custom branch.

Also you can unprotect it in the project settings

Hello,
thants for your reply.

There is not protected Branch in my repository.

Can you tell me maybe if there is a log file and where I can find it? I would like to know exactly what is the problem. I don’t think, it is something configurable in the Frontend.

Greets.

I don’t know, but you should check if your user has the role ‘Masters’

Hello Jose,

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?

UPDATE

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:

Host <gitlab_url>
        HostName <gitlab_url>
        User foo
        RSAAuthentication yes
        IdentityFile <specific_ssh_key> (like ~/.ssh/id_rsa_foo>

Have fun with this solution! :slight_smile:

Greets.