gitlab 重置密码 版本差异 8.8.4-0

gitlab的密码忘了,内网服务器,正好也有gitlab服务器的权限。

百度结果大部分都是通过 gitlab-rails console production方式重置的,但是没有找到gitlab-rails,版本的差异导致的

也有通过执行 undle exec rails console production 这个命令来操作的,但是提示没有 bundle这个命令

 

 

 

需要进入到cd /opt/gitlab-8.8.4-0/apps/gitlab/htdocs/vendor/目录下面,执行

bundle exec rails console production命令,注意也需要切换到git用户下

su - git

cd /opt/gitlab-8.8.4-0/apps/gitlab/htdocs/vendor/

bundle exec rails console production

进入终端提示行来进行修改

user = User.find_by(email: '邮箱') // 或者根据id等修改

user.password = '密码'

user.password_confirmation = '密码'

user.save

 

参考博文

https://blog.csdn.net/oxp7085915/article/details/52242193

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值