I get the following error importing repo between Bitbucket accounts
Asked by Miguel Costa:

1. 09:33:14 git import for: <https://bitbucket.org/project1/repo1/>
2. 09:33:15 Cloning <https://bitbucket.org/project1/repo1/>...
3. 09:33:15 Remote Git clone failed: \<class 'bitbucket.apps.asyncx.tasks.RepoImportTask.ImportException'\>: Command failed. Return value: 128

The name of the original repo have been omited(sorry), the repo is private in another BitBucket account, correct credentials have been used in import page.


Answers:
author: Miguel Costa
body: I believe to understand where the error was now, initially I was using a combination of username(email) and password for my remote account, tried to use my username(non-email) with my account password, tried my account(email) with the APP password but never the right combination which should have been my username(non-email) and a APP password which ended up working.


author: Rich Budek
body: This one stumped me / us also. You do NOT use your login password.

You need to be on your Bitbucket page, go to the upper right corner on the gear for settings. Then pick Personal Settings. Now, on the left hand side it will say app password. Pick that, add in a new password, any label. Copy THIS app password, but still use you login name (or email) don't remember which, but use the App Password. It will work.

comments: author: Lukasz Duss
body: This one worked for me, thanks :)


author: agustin_munoz
body: Worked for me also. Thanks!!


author: goofyfooter
body: Using Username and App Password worked for me! {#toc-hId--522494177}
--------------------------------------------------------------------

My issue was importing an existing BitBucket git repo to a new BitBucket git repo in the same workspace. The error was always return code 128 for all my various attempts until I checked the "Requires authorization" checkbox, supplied my BitBucket **Username** and specified my "**App Password**" in Password. Then the import sailed through.


author: Emmanuel Egbuniwe
body: If you're using your Username NOT EMAIL Address AND the password you generated when creating the APP on your workspace then this should work. If it doesn't then you might want to take a look at the URL of the repository you're trying to IMPORT to double check if it is correct.


author: Brad Mehlenbacher
body: Thank you! user name (what shows up in the https url when you git clone) plus a new app password worked - for those unaware, create an app password in your personal settings.  

On the bitbucket side - please be a little bit less ambiguous with your requirements and errors!

comments: author: kleeh
body: It **still** doesn't work. I can view the code with the old URL. I've tried using the "username" associated with the account along with the "app password"; I've tried using the "username" with the previous password; I've tried using the email with both of those. None of this works. I don't understand why y'all had to make this so complicated. It worked fine before. I guess I'll just continue to view the repo by typing in the old URL.


author: Carlos Leitao
body: Hi everyone,

Any progress on this? I'm having the same issue.

Rgds,

Carlos

comments: author: Miguel Costa
body: Hi [@Carlos Leitao](/t5/user/viewprofilepage/user-id/5008656)

The answer for my issue is marked on top.


author: Carlos Leitao
body: Hi [@Miguel Costa](/t5/user/viewprofilepage/user-id/4994522),

It worked just fine.

Just for ref. I was getting the error while trying to import a repo without ticking the "Requires Authorization" box.

Cheers,

Carlos


author: Syahrul
body: Hey [@Miguel Costa](/t5/user/viewprofilepage/user-id/4994522)

Welcome to the community!

I am wondering what password you used to do the export, is it your account password? If yes, I believe it won't work as we now require [App Password](https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/) as an alternate to account password.

Can you generate a new App Password and use it to export?

Let me know how it goes

Cheers,  
Syahrul

comments: author: Miguel Costa
body: Hi [@Syahrul](/t5/user/viewprofilepage/user-id/744536)

Thank for the reply, I was indeed using my account details for the other Bitbucket account. I was aware of the app passwords but never gave it a try to be honest, I have followed your advice and created a app password with full permissions to give it a try but unfortunately still getting the same error.

Regards,

Miguel


author: Syahrul
body: Hey [@Miguel Costa](/t5/user/viewprofilepage/user-id/4994522)

Interesting. Can you grab a screenshot of the Import config? You can mask out the Username/Password and Repo name.

I want to review how your import config and reproduce the issue since I'm not getting any error when I try to do the same import on my end.

Cheers,  
Syahrul


author: Miguel Costa
body: Hi [@Syahrul](/t5/user/viewprofilepage/user-id/744536)

Thanks for the update, please see below:

![Import.png](https://community.atlassian.com/t5/image/serverpage/image-id/208568i2AB403F52521113D/image-size/large?v=v2&px=999 "Import.png")

1. I'm using the Bitbucket account username and password for the remote repo, I've also tried to create an app password and use that but getting the same error , sorry for the redacted stuff but it's the best I can do.

2. After I get the following error:

![error.png](https://community.atlassian.com/t5/image/serverpage/image-id/208569i512FF30EB3BAC194/image-size/large?v=v2&px=999 "error.png")

For now I am currently using the "transfer" feature under the repository settings instead to move them across.


author: Syahrul
body: Hi [@Miguel Costa](/t5/user/viewprofilepage/user-id/4994522)

Looking at the screenshot, I notice in the **Username** section, you use your email address instead of your username.

Can you change it to your username? You can find your username under your **Personal settings**or directly at this link:

* <https://bitbucket.org/account/settings/>

It should show your **Username** under the **Bitbucket profile settings.**

Let me know if that helps.

Cheers,  
Syahrul


author: Miguel Costa
body: Hi [@Syahrul](/t5/user/viewprofilepage/user-id/744536)

Thanks for the reply, I have tried it but unfortunately still not working.

Regards,

Miguel


author: Shakeel.Ahmed
body: Hello guys,

same issue, any update here?

looks like there is some problem with importing


author: Syahrul
body: Hi [@Miguel Costa](/t5/user/viewprofilepage/user-id/4994522)

I've created a support ticket on behalf of you to continue the investigation. You can view your ticket [here](https://getsupport.atlassian.com/servicedesk/customer/portal/11/BBS-190325)

As for [@Shakeel_Ahmed](/t5/user/viewprofilepage/user-id/5002458) may I get a screenshot of your import config before we proceed further?

Cheers,  
Syahrul


Tags: bitbucket-cloud

cloud