为正能量而来 發表於 2023-6-7 00:00:00

如何重置Gitlab管理员密码

<p>gitlab web登入密码忘记以后可以用如下方式修改密码</p><p>#&nbsp;gitlab-rails console production</p><p>Loading production environment (Rails 4.1.11)</p><p>irb(main):001:0&gt; user = User.where(id: 1).first //id为1的是超级管理员</p><p>irb(main):002:0&gt;user.password = &#39;yourpassword&#39; //密码必须至少8个字符<br/>irb(main):003:0&gt;user.save! // 如没有问题 返回true</p><p>密码修改完成,去登陆吧</p>
頁: [1]
查看完整版本: 如何重置Gitlab管理员密码