How to block push to master without PR but allow Jenkins?

I'm not sure I understand the Branch permissions concept correctly.

I want to block user pushes to master, but there are some users that need to be able to do that i.e. Jenkins during release process.

I checked the "Prevent changes without a pull request" option but there's no way to exclude Jenkins from this rule.

When I use the "Limit write access to" we can't even merge PR's anymore.

Please help wink 

2 answers

As far as I know, there's no way to overwrite the rule requiring PRs for certain users.  And you have to have write access to merge a Pull Request.

The best alternative is probably to not require PRs but to limit write access to only the Jenkins user and a few trusted human users.  Then other developers will have to issue Pull Requests, and the Pull Requests will have to be merged by the trusted human users.  The trusted human users will be able to push directly to the branch, but - because they're trusted - they won't.

I understand your point, but that's not something I'm looking for.

1 vote
Jeff Thomas Atlassian Team Mar 29, 2016

Hi Greg, 

I think you understand the feature correctly, it's just that the feature you're looking for has not been implemented yet. I suggest keeping an eye on the follow feature request and Watch it for any future updates when we may implement this. This would allow you to specify the Jenkins user so that it can makes changes to master without a pull request.

Thanks for pointing me to the right place. I will be looking out for that feature.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

690 views 5 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you