gitlab重置密碼

gitlab-rails console -e production
user = User.where(id: 1).first​

或者

​user = User.find_by(email: 'admin@example.com')​
user.password = 'new_password'​​

user.password_confirmation = 'new_password'
user.save​