It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

grant user and group access to multiple repositories

Tran Tien dung Apr 19, 2019

Hi everyone, 

In our team project have many repositories, sometimes a new member or group join the team project, I have to grant access for them in all repositories. 

It not a good idea to add access to repositories one by one, so is there any script or method to add user/group access to a list of repositories?

Thanks.

2 answers

0 votes
Ana Retamal Ortiz Atlassian Team Apr 19, 2019

Hi,

You can create a user group and make it so every user with access to that group has permissions to all the repositories in the team. You can also make it so every time you create a new repository, the members of that group will get access to it by default.

Then every time you get a new member, you just need to add him to that user group and he'll automatically have access to all the repos. For more information, you can read Create and grant access to team repositories.

Hope that helps!

Ana

0 votes
Tran Tien dung Apr 19, 2019

Hi

I don't want one group can access all repositories. For example group A only get access to repositories of project A. Then we have a new group B, they need to access to some repositories of Project A, not all. So I have to add access for them in the list of repositories provided by them.

I'm looking for a script, it will loop by list of repositories and grant access to the new group. 

Ana Retamal Ortiz Atlassian Team Apr 19, 2019

Hi,

When you create the group, you decide which repositories will it be able to access. So you can create one group with access to all the repos in project A, and then another group with access to only some of the repos from project A. When you get a new user, you decide to which group you add him.

Regarding the script, I'm not sure what you want to achieve with it. In any case, please note that we won't be able to provide you with one, but you can find all the info and references at Bitbucket Cloud REST API.

Best regards,

Ana 

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

1,857 views 1 19
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you