Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Branch restrictions not working with user groups

vikramiron August 1, 2022

I have added two groups Admin and Dev on the repository and added following branch restriction

Write access : Admin

Merge via pull requests : Dev

But these restrictions are not working and when I push from Dev user it shows following error

 

remote: Permission denied to update branch Dev.
To https://bitbucket.org/myapi/apiv3.git
! [remote rejected] Dev -> Dev (pre-receive hook declined)
error: failed to push some refs to

 

I am not sure how to resolve this issue as I am following the guidelines written here https://support.atlassian.com/bitbucket-cloud/docs/use-branch-permissions/

Can anyone help me to resolve the issue and setup branch permissions.

1 answer

0 votes
Fabio Racobaldo _Herzum_
Community Champion
August 1, 2022

Hi @vikramiron ,

please could you share your repo permissions and branch permissions scrennshot? We need to figure out your current setup so that we can support you on that.

Please keep in mind that, in order to complete a pull-request a user need to have WRITE permissions on the target branch.

Fabio

vikramiron August 1, 2022

Hi @Fabio Racobaldo _Herzum_ 

Please check screenshots

User group permissions: https://nimb.ws/hXljB0

Branch permissions: https://nimb.ws/5UhjYu

 

I have changed the group name to Reviewer, when I try to push with a reviewer it shows the error mentioned in the question.

Fabio Racobaldo _Herzum_
Community Champion
August 1, 2022

Hi @vikramiron ,

in my opinion there is an inconsistence due to Write access just to admininstrators. If you remove that branch restriction all should be ok.

https://bitbucket.org/blog/take-control-with-branch-restrictions

Fabio

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events