Forums

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

Upload multiple bare repos to Bitbucket

Tristan McHardie
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 6, 2015

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
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 6, 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
TAGS
AUG Leaders

Atlassian Community Events