Allowed owner can't push to protected branch

Hi everyone, as per subject I’m struggling to force push to a master branch that I own despite I explicitely set the project to accept push from my user. Any idea why despite permissions being configured properly I still can’t push?

Thanks a lot for your help.

Did you try it without using --force?
If you still want to use it you might have to unprotect the branch first. Otherwise force pushing is not allowed, not even for masters.

No I didn’t try but technically without --force it won’t work because history is out of sync now, I can still try though…

The thing is that I’m not even a master, I actually am the owner. Just to understand if a branch is protected, no matter what, push --force is not allowed? To no one?

According to documentation force push is not possible for protected branches

There is a feature request to allow force push on protected branches

Ha! There you go. Thanks for pointing me to the right piece of information, that’s exactly what I was looking for. I am happy for the behaviour to be as it is knowing now that it’s documented as such and that it works as intended.

Thanks a lot for the info.