Repository import failed with the "Remote Git clone failed" error message

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

Summary

The repository import fails with the following error: "Your import has failed. For more information, check the log below. You can also try your import again."

1 2 3 15:10:07 git import for: https://bitbucket.org/workspace_id/repo_name/src/master/ 15:10:07 Cloning https://bitbucket.org/workspace_id/repo_name/src/master/... 15:10:08 Remote Git clone failed: <class 'bitbucket.apps.asyncx.tasks.RepoImportTask.ImportException'>: Command failed. Return value: 128

Cause

Basic authorization is needed to run the repository import. For more information on the authentication for Github and Gitlab, please check our documentation: Import a repository from GitHub or GitLab.

Solution

  1. Go to the repository import tool.

  2. Add the "Old Repository" URL.

  3. Under the URL field, select the "Requires authorization" checkbox to add the username and password details.

  4. If the old repository is in Bitbucket, you can find the username by navigating to your account settings: Select cog (on the top right corner) → Personal Bitbucket settings → Under Bitbucket profile settings the username will be there.

  5. You will need to use an app password for the authentication. You can generate one by following the App passwords documentation steps.

  6. Below is a log example of a successful repository import:

    1 2 3 4 5 6 7 We're getting things warm and cozy for your code. git import for: https://bitbucket.org/workspace/repo-slug/ Cloning https://bitbucket.org/workspace/repo-slug/... Done Fixing repository permissions... Computing repository size... Remote Git clone OK

Updated on April 16, 2025

Still need help?

The Atlassian Community is here for you.