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)