Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Your import has failed - Importing Private GitHub Repository

Kevin Corso October 24, 2023

I'm trying to import an existing private GitHub repository into BitBucket but I come up on the following error each time: import_error.png

Upon reviewing the forums here, it seems the correct solution for clearing the error is to ensure GitHub credentials are correct, but when I logged out and back into GitHub, despite using the very same credentials to try and import the repo seconds later on BitBucket, I still get the above error. 

My next thought was perhaps I needed to generate a token on GitHub or something, but I'm presently unable to locate a place on BitBucket to use it, so whether it's this or something else, any help would be appreciated.  Thank you!

1 answer

1 accepted

2 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 25, 2023

Hi Kevin and welcome to the community!

What the import does is clone the repo and GitHub has deprecated the use of account passwords for Git operations over HTTPS (Bitbucket Cloud has done the same), which is why the import fails:

Have a look at the section What you need to do today in this blog post, the article mentions the use of a personal access token instead of the account password.

In the import page in Bitbucket Cloud, right below the URL field, there is a checkbox Requires authorization. Check that checkbox, and you can use your GitHub username in the Username field, and the personal access token in the Password field.

Please feel free to let me know how it goes and if you need further assistance!

Kind regards,
Theodora

Kevin Corso October 25, 2023

Thank you for your help, Theodora!  I put the token in the password slot on the form and it worked exactly as intended :] 

Like Sabine Mayer likes this
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 25, 2023

That's good to hear, Kevin, and you are very welcome!

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

aidan_gani
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 16, 2024

Hi @[deleted],   I have the same issue with importing a Repo from one Bitbucket Cloud account to another.  I am Admin on both and would like to duplicate my project to another account without having to transfer it.

Have created an APP Password in the source account and used that in the Import Repo function with my login email.  Import fails with the same message as the original post.

Any suggestions?

Thanks,  Aidan

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

Hi Aidan,

You need to use the Username of the source account (which can be found here https://bitbucket.org/account/settings/ after you log in to that source account) with the app password.

The email is used only for logging in to the website from the browser. For activities like cloning, pulling, pushing via HTTPS (including Import, which does a clone), and API calls with basic authentication, the username is needed.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events