Register an authenticator
- Open your avatar menu and select Edit profile.
- Choose Access → Password and authentication.
- Under One-time password authenticator, choose Register authenticator.
Add GitLab to Sign In
You can use Sign In, our authenticator app for codes on your iPhone.
- With the setup QR code on another screen, open Sign In and tap Add → Scan QR Code.
- Scan the code, review the account details, and tap Add Account.
- Enter your current password and six-digit code in GitLab, then choose Register with two-factor app. Download your recovery codes.
GitLab provides enrollment details for manual entry as well as a QR code. In Sign In, choose Add → Enter Setup Key, set Service to GitLab and Account to your account name, paste the secret into Key, then tap Add Account. Keep this key private.
Save recovery codes
Store gitlab-recovery-codes.txt securely outside your phone. Each code works once. At the authenticator prompt, choose Recover your account to use one.
If these are unavailable, consult GitLab’s recovery instructions for your instance. Prepare recovery before replacing your phone.
Git and organization requirements
After enabling 2FA, use a personal access token for Git over HTTPS or API access instead of your password. Group or instance policy may require 2FA. Compatible WebAuthn devices provide another verification option.
If a code does not work
Make sure the GitLab entry in Sign In matches the account you are using. Wait for a fresh code, then enter it before it changes. If fresh codes keep failing, check that your iPhone uses automatic date and time.
Keep a working sign-in session and your recovery information available while resolving the problem. Adding an entry to Sign In does not finish enrollment: the service must accept a code and confirm activation.