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

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

Summary

The repository import fails with the following error:

Importing repository


We're getting things warm and cozy for your code.

(warning)Your import has failed. For more information, check the log below. You can also try your import again.

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 here.
  2. Add the "Old Repository" URL.
  3. Check the "Requires authorization" button to add the username and password details.
  4. If an old repository is within the Bitbucket Cloud only, the username can be found by navigating to your profile avatar logo (on the top right corner) → Click Personal 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 if you don't have, yet by following the steps mentioned in the App passwords documentation page.
  6. The successful repository import logs will be like below

    Successful import logs

    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

PermalinkEditDelete



Last modified on Sep 12, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.