bitnami gitlab修改密码

来源:互联网 发布:手机视频格式转换软件 编辑:程序博客网 时间:2024/04/20 09:18

在ubuntu上安装了gitlab,但是很久都没有使用管理员账号登录,忘记了管理员密码,而且也无法通过邮箱找回密码,所有在网上参考了其他网友的建议进行密码修改,在此记录操作过程中需要注意的地方:
参考链接
- 环境
Ubuntu 14.04 64bit
gitlab-8.8.4-0
软件安装路径:/opt/gitlab-8.8.4-0
- 操作步骤
假如管理员的邮箱地址为admin@local.host ,首先进入指定的目录运行rails console

$ su git$ cd /opt/gitlab-8.8.4-0/apps/gitlab/htdocs/vendor$ bundle exec rails console production

注意:如果没有进入到指定的目录,bundle将无法运行

rails console运行成功显示如下:
这里写图片描述
在终端输入:

user = User.find_by(email: 'admin@local.host')user.password = 'secret_pass'user.password_confirmation = 'secret_pass'user.save

其中secret_pass是想要修改的密码

0 0
原创粉丝点击