Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gitlab Account 2FA lost

Tags:

I have lost my Phone and do not have the recovery code for my 2FA for GitLab.

So I am locked out of my account.
What are my options?

like image 994
JanMer Avatar asked Aug 25 '16 09:08

JanMer


People also ask

How do I restore GitLab 2FA?

To use a recovery code, enter your username/email and password on the GitLab sign-in page. When prompted for a two-factor code, enter the recovery code. Once you use a recovery code, you cannot re-use it. You can still use the other recovery codes you saved.

How can I recover my lost 2FA?

Just use your authentication key (open your authentication application (app for 2FA) on your phone/device and manually enter the sixteen-character authentication key or scan the QR code you saved when enabling 2FA) to reinstall the 2FA codes in your authentication application and regain access to your account.

How can I recover my GitHub account without 2FA?

If you know your password for GitHub.com but don't have the two-factor authentication credentials or your two-factor authentication recovery codes, you can have a one-time password sent to your verified email address to begin the verification process and regain access to your account.


1 Answers

I know this is an old question, but the following, which I have tested only with gitlab.com free hosted accounts, may be useful for others with GitLab 2fa problems.

IF

  • you have set up 2fa but then lost access to your 2fa device for some reason, and
  • you have lost (or never saved) your recovery codes, and
  • you had previously configured your ssh key in your gitlab.com account

THEN ...

You can create a brand new list of recovery codes via ssh:

ssh [email protected] 2fa_recovery_codes 

Answer the questions and save the list of recovery codes somewhere safe this time! I'm guilty of all of the above and this solution provided by GitLab is both simple and elegant.

Source: https://gitlab.com/gitlab-org/gitlab-ce/issues/3765

like image 195
Nexus6 Avatar answered Oct 18 '22 20:10

Nexus6