重置gitlab管理员密码

Log into your server with root privileges. Then start a Ruby on Rails console.

Start the console with this command:

gitlab-rails console production

Wait until the console has loaded.

There are multiple ways to find your user. You can search for email or username.

user = User.where(id: 1).first

or

user = User.find_by(email: 'admin@local.host')

Now you can change your password:

user.password = 'secret_pass'
user.password_confirmation = 'secret_pass'

It's important that you change both password and password_confirmation to make it work.

Don't forget to save the changes.

user.save!

Exit the console and try to login with your new password.

Reset GitLab Root Password的更多相关文章

  1. how to reset mac root password

    Reset 10.5 Leopard & 10.6 Snow Leopard password Power on or restart your Mac. At the chime (or g ...

  2. Mac环境下mysql初始化密码问题--If you lose this password, please consult the section How to Reset the Root Password in the MySQL reference manual.

    个人在Mac上操作数据库,遇到的启动数据库问题的简单记录 1.苹果->系统偏好设置->最下边点mysql 在弹出页面中 关闭mysql服务(点击stop mysql server) 2.进 ...

  3. Linux - Reset a MySQL root password

    Use the following steps to reset a MySQL root password by using the command line interface. Stop the ...

  4. mysql forget root password

    http://www.rackspace.com/knowledge_center/article/mysql-resetting-a-lost-mysql-root-password MySQL - ...

  5. gitlab root密码重置

    版本:Gitlab Ruby Gem 4.16.1 root密码在gitlab第一次运行的时候,如果你没有配置root用户的密码文件,它就会生成一个随机密码,并保存在固定的文件中,然后输出在屏幕上.但 ...

  6. MYSQL更改root password时遇到Access Denied的解决办法

    今天在公司虚拟机上装MYSQL之后需要修改root password,然而遇到这样的错误: Access denied for user 'root'@'localhost' (using passw ...

  7. mysqladmin -u root password

    ERROR : Error appeared during Puppet run: 192.77.108.242_mysql.ppError: mysqladmin -u root  password ...

  8. MYSQL安装时解决要输入current root password的解决方法

    在装MYSQL的时候发现要输入current root password不记得以前在电脑里装过(你的系统曾经装过MYSQL在重装就会要求输入原来设定的密码,如果是第一次安装就不会出现),在网上苦苦搜寻 ...

  9. centos7开机出现try again to boot into default maintenance give root password for maintenance

    开启centos7出现下面两句话,然后直接输出root密码,就可以登录,但是登录后,发现一些文字显示出来的是乱码 try again to boot into default maintenanceg ...

随机推荐

  1. chrome inspect 远程调试H5

    chrome://inspect/#devices 一个内置于chrome的远程调试指令,满足远程调试的几个必须条件 1,能够访问https://chrome-devtools-frontend.ap ...

  2. 【NOIP2013】转圈游戏 快速幂

    题目大意:给你四个整数$n,m,k,x$,求$(x+m\times 10^k)%n$. 直接一个快速幂就好了,注意开$long\ long$. #include<bits/stdc++.h> ...

  3. word转html 压缩图片网站

    word转html https://docs.google.com/document/d/1MS-os1NcEPSEe2OWRenGR_6CsEmEQUchoQoh-abmL1Y/edit 压缩图片 ...

  4. javascript数据结构与算法--基本排序算法(冒泡、选择、排序)及效率比较

    javascript数据结构与算法--基本排序算法(冒泡.选择.排序)及效率比较 一.数组测试平台. javascript数据结构与算法--基本排序(封装基本数组的操作),封装常规数组操作的函数,比如 ...

  5. Ethereum White Paper

    https://github.com/ethereum/wiki/wiki/White-Paper White Paper EditNew Page James Ray edited this pag ...

  6. [转]C# 理解lock

    原文:http://www.cnblogs.com/apsnet/archive/2012/07/08/2581475.html 一. 为什么要lock,lock了什么? 当我们使用线程的时候,效率最 ...

  7. hadoop下安装mahout

    安装hadoop 完成 安装mahout 首先下载mahout压缩文件apache-mahout-distribution-0.12.2.tar.gz 放到/home/hadoop/software- ...

  8. MySQL中一个sql语句包含in优化问题

    第一版sql: SELECT module.id, module.module_name, module.module_code `module` where IN (module.did_acces ...

  9. windows服务与其他进程使用MemoryMappedFile

    首先,名字必须以Global\开头. 其次,需要配置权限 var rule = new AccessRule<MemoryMappedFileRights>("everyone& ...

  10. 钉钉微应用接入钉钉免登陆配置记录。NET实现

    在这里记录一下我配置的钉钉接入微应用遇到的坑.搞了我几天天才调通.头皮发麻,现在梳理一下,以免别人也入坑. 1.钉钉接入主要要获取钉钉企业员工的ID,然后去自己的应用的数据库里进行匹配然后实现免登陆的 ...