Disable gitlab two step verification in CLI

2.8k views Asked by At

I have a situation, Google Authenticator generates non-valid codes and my recovery codes are all expired, how can I disable it via command line?

1

There are 1 answers

2
Moe Far On BEST ANSWER

I found the answer, we can disable it via gitlab-rails :

gitlab-rails runner 'User.update_all(otp_required_for_login: false, encrypted_otp_secret: "")'