Search code examples
gitgitlabtwo-step-verification

Disable gitlab two step verification in CLI


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?


Solution

  • 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: "")'