When locked out of the Gitlab environment, you’ll need to enable default sign-in method when OIDC or AD is configured. This could be done from within the UI, but if you are locked out then this method will ofcourse not work.

Enabling sign-in can also be done from the command line. SSH into the Gitlab server and perform the following command to enable sign-in.

start rails console (takes a while)

1
gitlab-rails console

Enable

1
Gitlab::CurrentSettings.update!(password_authentication_enabled_for_web: true)

Disable

1
Gitlab::CurrentSettings.update!(password_authentication_enabled_for_web: false)