epcim
3/15/2016 - 10:51 AM

gitlab reset admin password

gitlab reset admin password

#!/bin/sh
#https://forum.gitlab.com/t/how-to-reset-the-admin-password-via-the-rails-console/223

# Change to gitlab directory. Normally, /home/git/gitlab.
cd /srv/git/gitlab

sudo -u git -H bundle exec rails console production



user = User.find_by(email: 'admin@local.host')
user.password = 'secret_pass'
user.password_confirmation = 'secret_pass'
user.save

user = User.find(1)