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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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,557,459
Community Members
 
Community Events
184
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
Atlassian Team members are employees working across the company in a wide variety of roles.
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 ?

Same issue here: no code after the line

Your single-use recovery codes are
Like Admir Husić likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events