Can still push to a protected branch

I’m trying to set up protected branches so that we don’t push to a branch by accident that kicks off any of our automations. I’ve set up my repository to have two teams with write access (call them dev and ops), and then I’ve set up a protected branch which will only allow the ops team to push to it.

However, when testing we find that people in the dev team are still able to push to the protected branch.

Am I doing something wrong? The docs suggest that administrators and those with Maintain access will always be able to push, but the dev team definitely only has write access, and the members of the dev team definitely don’t have access to the repo from anywhere else.

Thanks in advance!

Hi @nikoraisu :wave:

I appreciate you taking the time to submit this strange behavior to us. I glanced at the Org that you’re a member of and see that each repository is private. This makes it difficult to do independent research on what’s happening without asking questions that would expose information you might want to keep private.

Though as you mentioned, Admins will always be able to push to protected branches and I assume these users are not Admins, and their only permissions for this particular repo, is on their respective team.

Without exposing private information, are you able to let me know which person and/or, which repo, you see this behavior on?

If you aren’t comfortable posting publicly here, maybe we need to get you into a private ticket with our Support Engineers to look more closely.

Let me know!


Sure - a ticket would be super helpful, as these are our internal company repos and so I’m not in a position to post about them publicly. Yes I can confirm that the user who is incorrectly able to push to the protected branch is not an admin, and only has access to the repo via their team.