My company is evaluating bitbucket as our central VCS. We currently use gitlab 7.13.4. We have looked for an automated way to migrate all of our gitlab repos into bitbucket but my searches have come up empty. There are plenty of examples for doing this one at a time, but nothing to do all of them in a batch. With hundreds of repos we'd like to use a process that has a good chance of reliability.
As a bonus is there a way to migrate groups and permissions automatically?
Best Answer
You can use the Bit Bucket REST api, here is some Perl I use to import a repository into bitbucket:
Then you can wrap around that with a shell script:
Assumes that all of your repos have been cloned into the current directory.
https://developer.atlassian.com/static/rest/bitbucket-server/latest/bitbucket-rest.html