Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,357
Community Members
 
Community Events
165
Community Groups

How can i get recovery code of bitbucket using SSH keys ?

Edited

I lost "Authy App" due to which i am not be able to signin to bitbucket .
Also i forget to save my recovery codes.
But i have my ssh keys.

and my account is login with Google.
Can you help me, how can i recover my bitbucket account ?

i tried these steps:

I have ssh keys, And i also tried to recover my Bitbucket account using SSH keys.

→ Link: https://confluence.atlassian.com/bitbucket/two-step-verification-777023203.html?_ga=2.170468384.1643256017.1556089847-1526224153.1556089847#Two-stepverification-RetrievearecoverycodethroughSSH

Steps:

When i execute this command: “ssh git@bitbucket.org recovery_codes“. Output:“Because your Atlassian account admin requires single sign-on, you’ll need to authenticate with an app password. Create an app password “

And then i tried to add my SSH keys to agent using this command: “ssh-add -K ~/.ssh/id_rsa”output: “Identity added: /Users/<mac-name>/.ssh/id_rsa (/Users/<mac-name>/.ssh/id_rsa)”

then tried again accessing for the recovery codes, but still same output as mentioned above.

 

2 answers

Reset the password with this link

https://bitbucket.org/account/password/reset/?_ga=2.151298617.1860727660.1566931470-162300141.1566931470

Then finally this

ssh git@bitbucket.org recovery_codes

Would not work since you need recovery code to reset the password

It did work for me and many people I know. Did you try the link ?

Resetting the atlassian password and then using that to recover codes worked for me.

This link is for resetting the bitbucket password

0 votes
Ana Retamal Atlassian Team Apr 26, 2019

Hi Muhammad, welcome to the Community.

That's great that you have your SSH keys! That way you'll be able to obtain 6 new recovery codes that you can use to access your account again and set your new device for authentication. 

To obtain the codes, please enter the following in the command line of the computer where you're using your SSH key:

ssh git@bitbucket.org recovery_codes

This will bring out 6 recovery codes (one time use only) that you can use to get in. This is explained at Two-step verification.

Let us know if you need anything else.

Best regards,

Ana

I have execute this command 

ssh git@bitbucket.org recovery_codes

 but output is: 

Bitbucket two-step recovery codes
"If you don't use a password to log in you'll need to contact support to recover your account: https://support.atlassian.com/bitbucket-cloud/
Enter Bitbucket password (Warning: password displays when entered): -------

Because your Atlassian account admin requires single sign-on, you'll need to authenticate with an app password. Create an app password at https://bitbucket.org/account/admin/app-passwords"

and when i click on provided link, it will redirect me to "Enter Verification Code".

Like aneez-paytm likes this

Use Authy app to get recovery code, I have installed this app and totally forgot about this. Luckily I was able to get my recovery codes from this app and able to login back to my BB account, thanks

@Ana Retamal I'm having this exact same problem. I do not have a password since I use SSO. Is there anyway to enter a password using SSO?

@mjoshi I think a large part of the problem is that neither myself or @arij.siddiqui have access to the original 2FA application. I use Google Authenticator (Not Authy) and it is on my old phone that I have traded in. 

Thank you,

Sam

Like - likes this

Hum, when I request the recovery_codes, they comeback empty :

~ % ssh git@bitbucket.org recovery_codes

Bitbucket two-step recovery codes

If you don't use a password to log in you'll need to contact support to recover your account: https://support.atlassian.com/bitbucket-cloud/

Enter Bitbucket password (Warning: password displays when entered): XXX-XXX-XXX-XXXX

 

Your single-use recovery codes are

 

Once logged in, you should immediately visit

https://bitbucket.org/account/user/xxxxxxx/two-step-verification/

to add a new two-step device.

 

Thank you for using Atlassian Bitbucket.

~ % 


There is nothing after the  "Your single-use recovery codes are" ? -- Any idea ?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,229 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you