热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

gitlab重置password

ruby没怎么学,自己搭建的gitlab的rootpassword又忘了。幸好看见此帖子,试验okhttp:roland.kierkels.netgitreset-your-git



ruby没怎么学,自己搭建的gitlab的rootpassword又忘了。幸好看见此帖子,试验ok
http://roland.kierkels.net/git/reset-your-gitlab-root-password-from-a-terminal/


RESET YOUR GITLAB ROOT PASSWORD FROM A TERMINAL

Seriously ‘Invalid email or password’. I know for sure that it was correct, or wasn’t it?

Are you in the same situation and resetting your password the old school way doesnt work for you then here is a solution
to hack your back into GitLab. To make this work you need of course root access to your GitLab server.

Start by logging into your server with root privileges. Then start a Ruby on Rails console. Don’t worry if you have never worked before in Ruby, I hadn’t too, its really easy!

Start the console with this command:

Next wait until the console has loaded. You will see something like this if everything is OK:

技术分享

Gitlab Rails Console

Now there are multiple ways to find your user. In my case I know there was only one user and it had so it has ID 1. But you can also search for email or username.

Now lets change your password:

Its important that you change both password and password_confirmation to make it work.
Now lets save the changes.

The ( ! ) symbol is very important. Otherwise your changes are not pushed to the database. Now exit the console and try to login with your new password. It should work now.



推荐阅读
  • http:acm.hdu.edu.cnshowproblem.php?pid2052内容比较简单就是打印图案。。。但是方法是对于四个角,第一行第四行,中间行要进行分类。#inclu ... [详细]
  • 学习kmp算法我最后是看的数据结构书上的一本教材学会的。。我觉得kmp相对于普通的BF算法就是避免了很多不必要的匹配,而kmp算法的精髓自然就在于next数组的运用。。。而next ... [详细]
  • 4554:[Tjoi2016&Heoi2016]游戏 ... [详细]
  • 1.ArrayList是实现了基于动态数组的数据结构,LinkedList基于链表的数据结构。 2.对于随机访问get和set,ArrayList优于LinkedList,因为Ar ... [详细]
  • hadoop1.2.1文档中这样写:Nowcheckthatyoucansshtothelocalhostwithoutapassphrase:$sshlocalhostIfyou ... [详细]
  • Flutter 布局(四) Baseline、FractionallySizedBox、IntrinsicHeight、IntrinsicWidth详解
    本文主要介绍Flutter布局中的Baseline、FractionallySizedBox、IntrinsicHeight、IntrinsicWidth四种控件,详细介绍了其布局 ... [详细]
  • mysql  GROUP_CONCAT获取分组的前几名
    如果是oracle应该很容易用Partition By实现。比如说要获取班级的前3名,就可以用GROUP_CONCAT+ GROUPBY + substring_index实现。考 ... [详细]
  • 动手动脑,无法自拔(3)课时作业6
    1.动手动脑(五子棋棋盘排布)(1)源程序(2)实验截图2.动手动脑(数字转换成汉字)(1)源程序(2)实验截图3.动手动脑(大数计算)(1)源程序 ... [详细]
  • P1025数的划分学傻了,学傻了,什么d ... [详细]
  • substring( ) 和 substr( ) 的区别
    1、里面的参数定义不一样substring(x,y)substr(x,y);substring里面的x,y是位置,相当于坐标,substr里的x是位置,y是长度length特殊备注 ... [详细]
  • 说到C语言的语句块,真是一堆血泪史。第一大坑就是优先级。刚工作那会儿,C的书没看几本,自信满满的认为C语言都会了,拿出搞ACM培养的豪情壮志,代码倒是写得爽,却到处留 ... [详细]
  • Allegro总结:1.防焊层(SolderMask):又称绿油层,PCB非布线层,用于制成丝网印板,将不需要焊接的地方涂上防焊剂.在防焊层上预留的焊盘大小要比实际的焊盘大一些,其差值一般 ... [详细]
  • 从壹开始前后端分离【 .NET Core2.0 +Vue2.0 】框架之六 || API项目整体搭建 6.1 仓储模式
    代码已上传Github+Gitee,文末有地址  书接上文:前几回文章中,我们花了三天的时间简单了解了下接口文档Swagger框架,已经完全解放了我们的以前的Word说明文档,并且可以在线进行调 ... [详细]
  • 前言:关于跨域CORS1.没有跨域时,ajax默认是带cookie的2.跨域时,两种解决方案:1)服务器端在filter中配置详情:http:blog.csdn.netwzl002 ... [详细]
  • 最近帮人用Apache+Tomcat在同一台IP的服务器上设置多域名指向不同网站站点,花费了不少的时间。尤其是配置信息的时候,从网上找的资料有很多是错误的,误认不浅。所以今天特意把 ... [详细]
author-avatar
手机用户2502863087
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有