Since Gitlab 13.1.1: not allowed to push to protected branch

since I have updated from 13.0.x to 13.1.1 I have a problem when I try to push to a protected branch. (I am using the omnibus packages)
Even if I am the Maintainer of the project, and i try to do a ‘normal’ push (no force-push) I get the following error:

remote: GitLab: You are not allowed to force push code to a protected branch on this project.

For me it is clear, that it is not allowed to force push to a protected branch, but it is definitely no force-push, as the difference between the remote branch and the local branch is an additional local commit.

Yesterday, when I upgraded to 13.1.2, the problem persisted.

The only solution is to unprotect the branch, push to the branch and protect again.
But that is a bit useless.

Does someone else have the same issues?


Exactly the same for me after updating from 13.0.X to 13.1.2.
Seems I have to downgrade back to get rid off the problem.

Hello !

I have the exact same problem with version 13.1.2 (2e7a6f64b07)

remote: GitLab: You are not allowed to force push code to a protected branch on this project.

But I’m not doing a force push.

Thanks to the gitlab team.

I’ve got the exact same issue as well. Has anyone reported this as an issue yet? It appears this is possibly a regression, as I remember this issue coming up a long time ago as well, and being fixed.

I have tested this to be an issue on 13.1.1 through 13.1.3
I’ve tested as Maintainer, and Owner , on repos that commit fine on prior versions, after the update get the error as above “GitLab: You are not allowed to force push code to a protected branch on this project.”

This is on the EE version, installed from Omnibus on Ubuntu 18.04 LTS

Only way so far I’ve found to work around it is to unprotect the branch and commit. If I do that, and subsequently re-protect the branch I again can’t commit.

we also use ‘Ubuntu 18.04.4 LTS’ in our company for the gitlab-server.
But with debian stable (debian 10) on my private gitlab-instance I don’t get this problem.
Thus, it may be a an issue, if gitlab-ce omnibus is used together with ubuntu 18.04-LTS.

hi all, a have same issue after update to 13.1.4

Bump. We just started seeing the same issue, running 13.1.4 (upgraded from 13.0.5) on RHEL 7. This is a significant issue which affects all users across all projects. I’m assuming that this is meant to be some sort of security “feature.” I have opened SR # 164405 at a high priority and will update this thread with any fix.

Hello. Thank you all for posting.

If /var/opt/gitlab/git-data resolves via a symbolic link, it appears that 13.1.x has the issue y’all are describing.

I suggest following along to the issue. It’s being actively investigated.

regards, Ben

GitLab Support