Bitbucket Cloud Migration Assistant (BCMA) - Invalid Pre-flight check due to repository name conflicts
Platform Notice: Cloud, Server, and Data Center - This article applies equally to all platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
While performing a migration from Bitbucket On-Prem to Bitbucket Cloud via the Bitbucket Cloud Migration Assistant (BCMA), the pre-flight check returns an error indicating "Some repositories are invalid"
.
This is due to a check that validates if any repositories selected in your current migration plan conflict with the names of any existing repositories already in your destination workspace or conflict with other repositories included in the migration plan.
Environment
Migrating from Bitbucket On-Prem to Bitbucket Cloud via the BCMA
Cause
This can be caused by the following:
- There are some repositories included in the migration that have the same name as repositories already present within your Cloud Destination.
- The repositories conflict with other repos in the current migration plan.
Bitbucket On-Prem allows repositories to have the same name in the same instance, as long as they are in different projects.
Meanwhile, Bitbucket Cloud's repository names need to be unique throughout the entire workspace. Repositories need to have unique names even if they are in different projects.
This means if a repository named "test" exists inside of one project and a different project also contains the repo "test", that this is perfectly valid in On-Prem while they would otherwise conflict with one another when migrated to Bitbucket Cloud. (Feature Request to add Project Key to URL)
Solution
Rename the repositories in conflict on the server or delete/rename the repositories within the destination Cloud workspace
Other Notes
If the repositories are in conflict with one another because the base repo has the same name but they come from different projects, we recommend renaming the repositories to append a prefix/suffix to the repo that associates to the project of origin. A third-party example script that can achieve this can be found here.