Upload multiple bare repos to Bitbucket

We currently run our own Git server but we are seriously considering moving all our repos to Bitbucket. We have 300+ bare repos and we're wondering if there's a way to quickly migrate these over? Really we just need the code and all branches and tags but we don't want to spend hours doing it manually.

1 answer

2 votes
Boris Berenberg Community Champion Jan 06, 2015

I think that your best bet would be to write a script to do this. You would create the repositories using the REST api: https://confluence.atlassian.com/display/BITBUCKET/repository+Resource#repositoryResource-POSTanewrepository and then push the data into them using git

Edit: I also found the following

curl --request POST --user username:password https://api.bitbucket.org/1.0/repositories --data name=myrepo --data scm=git

From http://stackoverflow.com/questions/8983370/how-do-you-import-a-large-number-of-repositories-to-bitbucket-easily

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 ...

228 views 3 7
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