I'm trying to import an existing private GitHub repository into BitBucket but I come up on the following error each time:
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!
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
Thank you for your help, Theodora! I put the token in the password slot on the form and it worked exactly as intended :]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's good to hear, Kevin, and you are very welcome!
Please feel free to reach out if you ever need anything else!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.