1、打开服务器终端,使用root登录Gitlab所在服务器。
2、输入命令:
gitlab-rails console production
3、等待ruby控制台界面显示出来。
4、使用邮箱查找用户:
>user=User.where(email:'xxx@yyy.com').first
5、修改密码:>user.password=12345678
6、确认密码:>user.password_confirmation=12345678
7、保存:>user.save!
8、退出:>quit
修改完成。
注意:邮箱要加单引号,密码不加单引号。
-----------------------------------------------------------------------------
参考: