Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,299,295
Community Members
 
Community Events
165
Community Groups

Is there an easy way to copy a repositories settings to another repository?

PROBLEM:

Each time I set up a new repository the underlying branch permissions, branching model and users/groups have to be manually entered, Is there any way to speed up this process?

THINGS I'VE TRIED:

Bitbucket Cloud Rest API: I've tried automating repository creation by creating the repo and the underlying settings through the API, this has been partially successful, though I've found with the Branch Permissions you cannot simply "get" those from another repo, remove the ID's and "post" to give you an identical repository setup.

Python Libraries: I've tried a couple but I've found they either need to be re-worked for bitbucket cloud (they all seem to be for Bitbucket Server and those that aren't don't seem to be up to date)

 

Any advice on tools people may have used in the past would be appreciated!

 

 

3 answers

1 accepted

1 vote
Answer accepted

Hello @jimmy.askew ,

Welcome to the Community!

There's no such tool in Bitbucket UI, and I'm not aware of any third-party add-ons that would do this, unfortunately. However, this should be feasible with REST API.

 I've found with the Branch Permissions you cannot simply "get" those from another repo, remove the ID's and "post" to give you an identical repository setup.

Hm, this should work with this endpoint. Note that it expects one restriction per call, maybe that was the problem? See this thread, for example.

Hope this helps. Let me know if you have any questions.

Cheers,
Daniil

I also would like to be able to do this. Or at least set the settings up at the administrative level so that all new repositories have a standard template of settings, README.md and .gitignore.

Though I'd be happy with just the bitbucket settings.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,239 views 2 9
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