[root@localhost bin]# pwd
/opt/gitlab/bin
[root@localhost bin]# ll
total 32
-rwxr-xr-x. 1 root root 3692 Aug 10 11:22 gitlab-backup
-rwxr-xr-x. 1 root root 1418 Aug 10 11:22 gitlab-ctl
-rwxr-xr-x. 1 root root 250 Aug 10 11:22 gitlab-healthcheck
-rwxr-xr-x. 1 root root 702 Aug 10 11:22 gitlab-psql
-rwxr-xr-x. 1 root root 1301 Aug 10 11:22 gitlab-rails
-rwxr-xr-x. 1 root root 1300 Aug 10 11:22 gitlab-rake
-rwxr-xr-x. 1 root root 724 Aug 10 11:22 gitlab-redis-cli
-rwxr-xr-x. 1 root root 1300 Aug 10 11:22 gitlab-ruby
[root@localhost bin]# ./gitlab-rails console -e production
--------------------------------------------------------------------------------
Ruby: ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux]
GitLab: 13.12.10 (9c49ed428ce) FOSS
GitLab Shell: 13.18.1
PostgreSQL: 12.6
--------------------------------------------------------------------------------
Loading production environment (Rails 6.0.3.7)
irb(main):001:0> u=User.where(id:1).first
=> #<User id:1 @root>
irb(main):002:0> u.password='12345678'
=> "12345678"
irb(main):003:0> u.password_confirmation='12345678'
=> "12345678"
irb(main):004:0> u.save!
=> true
irb(main):006:0> exit
[root@localhost bin]#
GitLab重置密码
最新推荐文章于 2025-03-13 13:35:37 发布