GitLab logo

Work

Set up 2FA for GitLab

Enable code-based two-factor authentication in GitLab, then connect its setup QR code or key to Authenticator.

By Team2Swift · Updated

Open the service security settings

Edit profile → Access → Password and authentication

Under One-time password authenticator, choose Register authenticator. Use the QR code or the information in OTP details.

Add the account in Authenticator

  1. Keep the setup screen open. In Authenticator, use the add-account control.
  2. Scan the service’s setup QR code. On one phone, choose manual entry and copy the setup key instead.
  3. Give the entry a recognizable account label. Never share the setup key or QR code.

See the account setup guide

Confirm and keep a recovery method

Return to the service and enter the current code from your new entry. Setup is complete only after the service accepts it.

A verified email is required. Complete registration with your GitLab password and the current authenticator code, then save recovery codes. Self-managed versions can differ.

If the code is rejected

Check the account, wait for a fresh code and check automatic device time. Keep the service setup page open until confirmation succeeds.

Troubleshoot a rejected code

Official GitLab help

Based on the service’s official instructions, checked October 17, 2026. Available methods and labels can vary by account and app version.

Read the official instructions