> For the complete documentation index, see [llms.txt](https://dojo.lkmx.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dojo.lkmx.io/ingles/gitlab/setup-two-factor-authentication-for-gitlab.md).

# Setup two factor authentication for GitLab

## Sign in

Go to [GitLab](https://gitlab.com/users/sign_in) to sign in

## Go to account settings

Click on **Edit profile** or **Preferences** to go to **User Settings.**

## Enable authentication

Go to **Account** and click on **Enable two-factor authentication.**

### **On your device (usually phone)**

Install a compatible app:

1. Cloud base (recommended because you can restore access if you lose the hardware device):
   * [Authy](https://authy.com/)
   * [Duo-mobile](https://duo.com/product/multi-factor-authentication-mfa/duo-mobile-app)
2. Other
   * [Google-Authenticator](https://support.google.com/accounts/answer/1066447?hl=en)
   * [Microsoft-Authenticator](https://www.microsoft.com/en-us/security/mobile-authenticator-app)

In your app, add a new entry in one of the two ways

* Scan the code provided by GitLab in with your device's camera to add it automatically.
* Enter the details provided to add the entry manually.

### **In GitLab**

Enter the six-digit number provided by your device's new entry into **Pin code.**

Download the recovery codes provided by GitLab before continue.

Click on **Proceed.**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dojo.lkmx.io/ingles/gitlab/setup-two-factor-authentication-for-gitlab.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
