Use gitlab-rails-console command in README.Debian
This commit is contained in:
parent
c31bdba3c2
commit
c0b590a24e
1 changed files with 2 additions and 2 deletions
4
debian/README.Debian
vendored
4
debian/README.Debian
vendored
|
@ -132,7 +132,7 @@ Migrating from non-Debian gitlab
|
||||||
Resetting admin password without web interface
|
Resetting admin password without web interface
|
||||||
==============================================
|
==============================================
|
||||||
The steps involve dropping into rails console as gitlab user for production environment and then resetting the admin password via the user object.
|
The steps involve dropping into rails console as gitlab user for production environment and then resetting the admin password via the user object.
|
||||||
$ runuser -u gitlab -- sh -c 'cd /usr/share/gitlab && . /etc/gitlab/gitlab-debian.conf && export DB RAILS_ENV && bundle exec rails console production'
|
$ gitlab-rails-console
|
||||||
irb(main):001:0> user = User.where(admin: true).first
|
irb(main):001:0> user = User.where(admin: true).first
|
||||||
irb(main):002:0> user.password = 'secret_pass'
|
irb(main):002:0> user.password = 'secret_pass'
|
||||||
irb(main):003:0> user.password_confirmation = 'secret_pass'
|
irb(main):003:0> user.password_confirmation = 'secret_pass'
|
||||||
|
@ -141,7 +141,7 @@ The steps involve dropping into rails console as gitlab user for production envi
|
||||||
Granting an existing user admin access
|
Granting an existing user admin access
|
||||||
======================================
|
======================================
|
||||||
The steps involve dropping into rails console as gitlab user for production environment and running the following commands.
|
The steps involve dropping into rails console as gitlab user for production environment and running the following commands.
|
||||||
$ runuser -u gitlab -- sh -c 'cd /usr/share/gitlab && . /etc/gitlab/gitlab-debian.conf && export DB RAILS_ENV && bundle exec rails console production'
|
$ gitlab-rails-console
|
||||||
irb(main):001:0> user = User.find_by(email: 'useraddress@domain')
|
irb(main):001:0> user = User.find_by(email: 'useraddress@domain')
|
||||||
irb(main):003:0> user.admin=true
|
irb(main):003:0> user.admin=true
|
||||||
irb(main):004:0> user.save
|
irb(main):004:0> user.save
|
||||||
|
|
Loading…
Reference in a new issue