Two-factor Authentication (2FA) provides an additional level of security to your GitLab account. Once enabled, in addition to supplying your username and password to login, you’ll be prompted for a code generated by your one time password authenticator.
For example, a password manager on one of your devices. By enabling 2FA, the only way someone other than you can log into your account is to know your username and password and have access to your one time password secret.
Steps to activate two factor authentication ;
Click to “Enable two-factor authentication”.
Google Authenticator works with 2-Step Verification for your Google Account to provide an additional layer of security when signing in.
With 2-Step Verification, signing into your account will require both your password and a verification code you can generate with this app. Once configured, you can get verification codes without the need for a network or cellular connection.
Scan QR code using Authenticator app.
You’re almost done. Don’t forget to save your recovery codes. Once you lost to reach Google Authenticator App you will lose to access your Gitlab Account.
Congratulations! You successfully setup your Two-factor Authentication in Gitlab.