GitLab重置root密码

问题描述

今天同事说Gitlab平台的root账号登陆不上去了,重置报错.Gitlab版本为13.1

重置过程

到官网找文档,按照文档命令重置,按照官方的说法也可以通过API方式重置.

gitlab-rails console -e production
user.password = '12345678'
user.password_confirmation = '12345678'
user.save!
exit

注意问题

Gitlab版本不同,命令可能会有差异

原文地址:https://www.cnblogs.com/GYoungBean/p/13629994.html