首页 > 系统服务 > 详细

很久不用Linux和gitlab 的一些操作

时间:2020-11-25 22:35:44      阅读:48      评论:0      收藏:0      [点我收藏+]

挺久没有登陆 电脑 了 

今天登陆 linux 主机突发 密码忘了 git的也忘了

好的是 之前用的登陆还在,修改IP直接登陆 然后

[root@localhost testuser]# passwd testuser
Changing password for user testuser.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@localhost testuser]#

直接对应账号就行

然后发现gitlab密码也忘了 哎 ....

进入宿主
docker exec -it a63852603fac /bin/bash
vi /etc/gitlab/gitlab.rb

docker exec -it a63852603fac /bin/bash
------------------重置docker的gitlab密码---------------------
su - git

gitlab-rails console production //容易报错
gitlab-rails console -e production // 等待一会儿加载OK

user = User.where(id:1).first
user.password = ‘123123‘
user.password_confirmation = ‘123123‘
user.save!
exit
-----------------------------------------

 

备份时需要保持gitlab处于正常运行状态,直接执行进行备份
gitlab-rake gitlab:backup:create
/var/opt/gitlab/backups/

很久不用Linux和gitlab 的一些操作

原文:https://www.cnblogs.com/mrguoguo/p/14038916.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!