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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Unable to get Recovery Codes for 2FA

Hello,

The background:

> My bitbucket account has 2FA, I use google to sign in and at this moment I do not have access to my phone nor my recovery keys.  However, I do have the computer with the SSH keys of my bitbucket account.

The problem:

> I am running the command ssh git@bitbucket.org recovery_codes in order to generate some recovery keys and be able to access my account however, after putting my google password (remember I sign in to my account with google) I get the following response:

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

The problem is that to generate an app password I need to access my bitbucket account; however, I cannot access my account. Therefore, what do I do at this point?

 

Thank you for the help

9 answers

0 votes
Ana Retamal Atlassian Team Jul 11, 2018

Hi Humberto, welcome to the Community!

To assist you with this issue I've created a Support ticket for you, you should receive a notification about it shortly. One of my colleagues will contact you and help you solve this. 

If you have any other questions, please let us know! We're happy to help :)

Kind regards,

Ana

droo Atlassian Team Jul 11, 2018

@Ana Retamal Ortiz I've run into the exact same problem as Humberto. How can I be helped / added to that ticket?

Thanks,

Andrew

(re-pasted here as a reply, not an answer to humberto's question)

Thank you, @Ana Retamal .

I am looking forward for the help with this issue.

 

--

Humberto

Ana Retamal Atlassian Team Jul 13, 2018

Hi @Humberto Linero Fuentes, I just talked to my friends from the Bitbucket Cloud team and they confirmed they'll reach out to you shortly :) 

Cheers!

Ana

Hi, @Ana RetamalI’m trying to run this command `ssh git@bitbucket.org recovery_codes` but I keep getting this response `git@bitbucket.org: Permission denied (publickey).` even if I have SSH key on my bitbucket. Now I can’t open my bitbucket account anymore. Please help me.

Ana Retamal Atlassian Team Jan 15, 2019

Hi @cristelledoong, you said you had the SSH key on your Bitbucket, but can you confirm you have the other part of the SSH key in your computer? Otherwise, Bitbucket won't be able to authenticate. You can run the following command to see if your machine can authenticate to the right username:

ssh -T git@bitbucket.org

And this other command to see the SSH key that your machine is offering:

 ssh-add -L

Let us know!

Ana

This is the response:

$ ssh -T git@bitbucket.org
git@bitbucket.org: Permission denied (publickey).

and

$ ssh-add -L
Could not open a connection to your authentication agent.

What should I do with it? Is there any way out?

In a shell (or CLI) try

ssh-add -l

 If you get a message saying "you agent has no identities" try

ssh-add ~/.ssh/<private_key>

 Then try to ssh to bitbucket.

Ana Retamal Atlassian Team Jan 15, 2019

HI @cristelledoong,

Seems like the private part of your SSH key is not in your computer, or your SSH agent can not find it. Can you confirm you have the other part of the SSH key in your computer? 

If you're sure you have it, then you can follow the steps in the section Your identity isn't loaded into your SSH agent from the article Permission denied publickey.

If you are in a different computer, or you formatted it or lost your SSH key, you won't be able to get recovery codes. Please, let us know if this is your case.

Kind regards,

Ana

Hi @John Cotter and @Ana Retamal, this is the response:

$ ssh-add -l
The agent has no identities.
$ ssh-add ~/.ssh/SSHKEY_PVT.ppk
Error loading key "/c/Users/admin/.ssh/SSHKEY_PVT.ppk": invalid format

 The key is loaded to Pageant as well

image.png

Nevermind, guys. I already fixed it.

> From SourceTree I loaded my SSHKEY_PVT.ppk, then on Conversion menu, I clicked the Export to Openssh file format. It will create a new file format. I named it id_rsa_pvt.

> I entered this command:

$ ssh-add ~/.ssh/id_rsa_pvt
Enter passphrase for /c/Users/admin/.ssh/id_rsa_pvt:
Identity added: /c/Users/admin/.ssh/id_rsa_pvt (/c/Users/admin/.ssh/id_rsa_pvt)

> then entered this command after:

ssh git@bitbucket.org recovery_codes

> I got my recovery codes now!

Ana Retamal Atlassian Team Jan 16, 2019

Glad you sorted it out, @cristelledoong :D And thanks for sharing your solution with the rest of users!

Have a nice evening,

Ana

Like cristelledoong likes this
0 votes
droo Atlassian Team Jul 11, 2018

@Ana Retamal I've run into the exact same problem as Humberto. How can I be helped / added to that ticket?

Thanks,

Andrew

Ana Retamal Atlassian Team Jul 13, 2018

Hi @droo! Addressing this issue with you privately now :)

Cheers,

Ana

@Ana Retamal facing a similar problem. I have keys of my bitbucket account and i can push/pull without any issues. when trying to recover codes via "

ssh git@bitbucket.org recovery_codes

im getting Invalid username or password error. would you please address the issue. Don't have my old phone which had 2f configured.

Ana Retamal Atlassian Team Aug 08, 2018

Hi @Ammad Hussain, as I said in the question you submitted, I've created a Support ticket for you, you'll receive an email notification soon!

Cheers :)

Ana

@Ana Retamal same issue here, trying to get my recovery codes and getting an invalid password error. thanks!

Same issue here:, While recovering the codes IT keeps on saying:

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

The problem is that to generate an app password I need to access my bitbucket account; however, I cannot access my account. Therefore, what do I do at this point?

Have created a ticket as well BBS-94918 Urgent | Account not accessibleCapture.JPG

Hello, I have  exactly the same issue, opened ticket

Hi Dear, I have also facing the same issue, opened ticket

Hi, 

Has there been any update or resolution to this issue? I have a team member in this exact situation and would appreciate any feedback, 

 

Thank you,. 

Yes, After completely understanding the situation, atlassian guys had sent an one time password reset link. I was then able to get my account back.

Thanks Rahul, 

Just to clarify this is referring to a situation where the user has their SSH key, but is using google SSO (as opposed to a bb password) when attempting to get the recovery codes for access?

@Ana Retamal I ended up in the same situation.

Opened BBS-101888 with Atlassian Support system.

Would it be possible to expedite it as I am currently locked out and unable to work?

 

Thanks.

Ana Retamal Atlassian Team Mar 14, 2019

Hi @Maxim Leonov , I've seen that one of my colleagues is already providing assistance. Do you need anything else?

Kind regards,

Ana

Yes, we are following it through. I am eagerly waiting for the recovery link as I am unable to work. It's technically been more than 48 hours since the email notifying that the recovery link has been sent.

I have recovered the access now.
Thanks.

Like Ana Retamal likes this
Ana Retamal Atlassian Team Mar 15, 2019

Thanks for the update, glad you can access now.

Have a good day!

Ana

@Ana Retamal I've run into the exact same problem as Humberto and others before me. Can you please help or provide further instructions how to act?

image.pngI logged in successfully but got no recovery codes. Not sure what happen with my account???

Suggest an answer

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

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

456 views 4 4
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