Bitbucket Cloud Migration Assistant (BCMA) - Git push Authorization Error

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

When using the BCMA, a "Authorization Error" may occur when attempting to push repos from the On-Prem instance up to Bitbucket Cloud.

Environment

Bitbucket On-Prem, Migrating to Bitbucket Cloud via BCMA.

Diagnosis

You will see a WARN log entry for "bitbucket.git.remote.authorizationerror" for each repo attempting to migrate and the repos will show "Incomplete" from the BCMA UI.

1 2 3 2023-03-01 12:01:01,000 WARN [bcma-1] admin @T23SJWx501x480001x0 13hm2u2 104.192.141.1 "POST /rest/plugins/1.0/ HTTP/1.1" c.a.b.p.b.g.c.PushStdioHandler$ExitHandler Git error: remote: To access this repository, an admin must whitelist your IP. fatal: unable to access 'https://bitbucket.org/migrationtesting/repo-slug.git/': The requested URL returned error: 403 2023-03-01 12:01:01,000 WARN [bcma-1] admin @T23SJWx501x480001x0 13hm2u2 104.192.141.1 "POST /rest/plugins/1.0/ HTTP/1.1" c.a.b.plugin.bcma.plan.PlanService Migration failed for plan 'Migration Plan 1' with error: Error occurred for PROJ-KEY/repo-slug during git push. com.atlassian.bitbucket.scm.NotAuthorizedScmException: bitbucket.git.remote.authorizationerror [12345abc-defg-1234-5678-1234567890ab::bitbucketRepositoryDataUpload]

Cause

The push of repositories is pointed directly to the target workspace while other actions (like migrating users) occurs via different services/platforms. This means that push operations from the on-prem instance, into your destination workspace, are subject to any Workspace IP Allowlistings that may be present.

Solution

Add your Bitbucket On-Prem's public IP address to your Cloud Workspace IP Allowlist

Updated on March 10, 2025

Still need help?

The Atlassian Community is here for you.