Resolving empty repository issue during migration with Bitbucket Cloud Migration Assistant (BCMA)
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
When migrating from Bitbucket Server to Bitbucket Cloud using the Bitbucket Cloud Migration Assistant (BCMA) tool. In some cases, even when the migration logs suggest a successful migration, an empty repository is actually pushed to Bitbucket Cloud.
For instance, the logs show:
2023-06-11 16:55:13,862 INFO [io-pump:thread-8] c.a.b.p.b.j.RepositoryDataUploadJob Push for workspace/repository - Enumerating objects: 12, done. @ 0% [UUID::BitbucketRepositoryDataUpload::UUID, BitbucketRepositoryDataUpload-UUID]
.
Diagnosis
Check the support zip file to identify any possible errors related to the problematic repository. Look for logs indicating a successful push.
Use the git count-objects command to compare the object counts in the server and cloud repositories after migration.
As another troubleshooting step, try cloning the repository locally to check for any errors that occur during this process.
Cause
The issue arises due to a project branch permission that has been set up on the Bitbucket Cloud side. When the repository gets imported, the project branch permission is inherited by the repository causing the push to fail.
Solution
To resolve this issue, disable branch permissions at the project level during the migration process. This will prevent the newly migrated repositories from inheriting these permissions that lead to the push failures. After the migration is complete, you can then re-enable the branch permissions as needed
Was this helpful?