branch level permissions

I'm testing the branch level permissions in Stash 2.0 but I must be missing something... I'm having trouble getting it to work, here's the setup:

Security Setup for 'testuser'

- Project Level Permissions: Observer

- Repository Branch Level Security: Write (Just to the available branch options, I tried the advanced as well with no luck)

Everytime I try to push the branch, i get:

fatal: remote error: Insufficient permissions

You do not have permission to push to the repository test in project

fatal: The remote end hung up unexpectedly

The 'testuser' can only write to the repository if I set it to Contributor at Project Level but then it can write to all branches. Am I missing a setting somewhere?
Thanks for any hints!

4 answers

1 accepted

0 vote
Jason Hinch Atlassian Team Dec 13, 2012

Just to clarify branch permissions doesn't elevate the project level permissions it is more of a restriction. When you push changes to a repository first the project level permission is checked. This is the same as it was in Stash 1.x meaning the user must be a contributor (have write access) to the project in order for their push to proceed. Stash then checks the branch permissions for each branch which is being updated. If a restriction exists and the user doesn't have permission the push is rejected. If there is no restriction or they have permission the push is successful.

Ah sorry, after some testing, ALL users need to be setup with contributor access and you have to assign permissions to the master branch (cannot leave blank).

Assuming the contributor that does not have push access to master but has push access to contrib then the contributor should make sure to only work, commit and push on branch contrib

Hey Jason,

I posted this today:

https://answers.atlassian.com/questions/134904/stash-security-bug-branch-permissions

It appears that your comment about branch level permissions being more restrictive is not functioning for us in Stash 2.0.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 06, 2018 in Bitbucket

Do you use Bitbucket Cloud and Jira Cloud? If so, let us know!

Hi Community, I'm Julia and I'm on the Jira Software Cloud marketing team!  We're looking for companies or teams using Bitbucket Cloud and Jira Software Cloud. If your team fits the t...

170 views 6 3
Join discussion

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