Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

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

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


1 badge earned


Participate in fun challenges

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


Gift kudos to your peers

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


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!


I am unable to login to bitbucket because my 2FA authentication code is always rejected

I updated my bitbucket account last week to use 2FA, but after doing that, every code I enter using google authenticator is rejected. I have tried relogging in with a valid recovery code and authenticator code.

The error I get is:

invalid two-step authentication code.

My code changes every 2 minutes and I have used ones from just after it changes to see if it is a problem with the time on my laptop (which matches phone time on two laptops and two phones so I don't think it is a time mismatch).

I am able to login to Jira and Ops-genie, I even disabled 2FA from my OG which should be the same as bitbucket atlassian account, but bitbucket still asks for an authentication code and still will not verify it.

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.
Feb 22, 2021

Hi Neil,

Bitbucket Cloud uses Atlassian accounts (the ones for for authentication.

At the moment, it is possible to set up 2FA both for the Atlassian account (in and also for the Bitbucket account (in

If both are enabled, then there should be two entries in the authenticator app of your phone. One generating codes for Atlassian account 2FA and a second one generating codes for Bitbucket 2FA. It is not possible to use Atlassian account 2FA codes for Bitbucket and vice versa. 

I can see in our system that Atlassian account 2FA for your account is disabled, but Bitbucket 2FA is still enabled. It also sounds like the codes you are using may be the ones for the Atlassian account instead.

Do you have a two accounts/entries in the authenticator app on your phone, one for Atlassian and a second one for Bitbucket? If so, can you try using the 2FA codes generated from the Bitbucket one?

In case there is no account/option for Bitbucket in your authenticator app, you can do either of the following:

1. You can retrieve 6 recovery codes if you run the following command on the machine where you have your SSH keys for Bitbucket:

ssh recovery_codes

Please note that these codes are for one time use only, so you can use one of them to log in to Bitbucket and a second one to disable 2FA in the Bitbucket account. Afterwards, you can set it up again if you wish.

2. When you get asked for a Bitbucket 2FA code in your browser, you'll see a link 'Forgot code?' at the bottom of the page. Select that, follow the instructions, and an email will be sent in 24 hours to your Bitbucket account's email that will allow you to disable 2FA.

Please feel free to let me know if you have any questions.

Kind regards,


Thanks for that, I don't have two entries, just one for Atlassian so that explains why it is not valid but I'd never be able to get a valid one as I have no bitbucket entry! 

I have sent a recovery email - I did do that last week but the email arrived Friday night and the link ran out before I tried it - my fault. I've sent another.



Like Theodora Boudale likes this

I'm in the same situation - only one entry on authenticator app (Authy) and have sent the email but it's still not arrived - maybe I need to wait some more 

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events