doc/user/profile/user_passwords.md
{{< details >}}
{{< /details >}}
If you use a password to sign in to GitLab, a strong password is very important. A weak or guessable password makes it easier for unauthorized people to sign in to your account.
Some organizations require you to meet certain requirements when choosing a password.
Improve the security of your account with two-factor authentication.
Password requirements apply when you:
By default, GitLab enforces the following requirements:
gitlab or devops).On GitLab Self-Managed and GitLab Dedicated, administrators can modify password complexity requirements.
{{< details >}}
{{< /details >}}
{{< history >}}
notify_compromised_passwords. Disabled by default.notify_compromised_passwords removed.{{< /history >}}
GitLab can notify you if your GitLab.com credentials are compromised as part of a data breach on another service or platform. GitLab credentials are encrypted and GitLab itself does not have direct access to them.
When a compromised credential is detected, GitLab displays a security banner and sends an email alert that includes instructions on how to change your password and strengthen your account security.
Compromised password detection is unavailable when authenticating with an external provider, or if your account is already locked.
You can choose a password when you create a user account.
If your account was created with an external authentication and authorization provider, GitLab automatically generates a random password to maintain data consistency.
This password has the following properties:
friendly_token methodYou don't need to know or use this password.
You can change your password. The new password must meet the password requirements.
To change your password:
{{< history >}}
{{< /history >}}
If you forget your password, you can submit a request to reset your password.
To reset your password:
gitlab.example.com/users/sign_in.You are redirected to the sign-in page. If the provided email is verified and associated with an existing account, GitLab sends a password reset email.
[!note] Your account can have more than one verified email address, and any email address associated with your account can be verified. However, only the primary email address can be used to sign in once the password is reset.
GitLab stores user passwords in a hashed format, not as plain text. To hash passwords, GitLab uses the Devise authentication library.
Password hashes use these security measures:
OAuth access tokens are also stored in the database in PBKDF2+SHA512 format and stretched 20,000 times.