挺久没有登陆 电脑 了
今天登陆 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/