Import from Old Repository to New Repository in the same WorkSpace

Mauro Catellani December 30, 2024

Hi Community,

i try to import old repository in the new repository in the same workspace but i received this error:

Remote Git clone failed: <class 'bitbucket.apps.asyncx.tasks.RepoImportTask.ImportException'>: Command failed. Return value: 128

I also create an app password but the error still appears.

Thank you in advance for any help.

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 31, 2024

Hi Mauro and welcome to the community!

This error usually shows when wrong credentials have been provided for authentication. If the repo is private, you need to provide authentication details, even if the repo belongs to the same workspace.

On the Import page, after you provide the URL of the repo, select the checkbox Requires authorization. You will then see two additional fields, Username, and Password.

  • In the Username field, please provide the username of your Bitbucket account. If you are unsure what your username is, you can find it on this page https://bitbucket.org/account/settings/.

  • In the field Password, please provide an App password for your account, with at least Repositories - Read permissions. Your account's password won't work as it can only be used for logging in to our website from browser.

Please feel free to let me know how it goes.

Kind regards,
Theodora

Mauro Catellani January 1, 2025

Hi Theodora,

i try to import repo with your suggest but it doesn't works. The error is the same.

Kind regards

Mauro Catellani

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 3, 2025

Hi Mauro,

Thank you for the update. I haven't been able to reproduce this error so far in cases other than using incorrect credentials.

Can you please confirm if the URL you enter in the import window has the following format?

https://bitbucket.org/workspace-id/repo

 

I suggest trying to clone the repo from a terminal application on your computer, using the same credentials that you use for the import, so we can narrow down if the issue seems to be with the credentials or not.

Please note: if there is a credential manager on your computer and it has stored credentials for bitbucket.org, please delete the stored credentials for bitbucket.org first, so that you are asked to provide ones. Then, follow these steps:

  1. Open the repository you want to import on Bitbucket's website
  2. Select Source from left sidebar (if it is not already selected)
  3. At the top of the page, you should see a button Clone. Select it.
  4. You will see a new window with the clone command. Ensure that HTTPS is selected on the top right corner of this window, and copy the clone command.

The format of the clone command should be like this:

git clone https://username@bitbucket.org/workspace-id/repo-slug.git

In bold will be your own values.

Run this command in a terminal application on your computer.

You should see a prompt like the following:

Cloning into 'repo-slug'...
Password for 'https://username@bitbucket.org':

Please provide the same app password that you used for the import. Does the clone succeed or do you get any errors?

Kind regards,
Theodora

Mauro Catellani January 3, 2025

Hi Theodora,

yesterday, I managed to import the repositories by providing a new regenerated app-password :-)

I don't know why in the past days not function :-(

Kind regards

P.S.

Thank you for your suggest about clone with terminal application

Like Theodora Boudale likes this
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 6, 2025

Hi Mauro,

Thank you for the update!

I assume that the first app password you provided may have been incorrect, e.g. if you copied-pasted it, maybe some character was missed while copying it.

It's good to hear that the import worked with the new app password!

Please feel free to reach out if you ever need anything else.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events