docker-gitlab icon indicating copy to clipboard operation
docker-gitlab copied to clipboard

how to reset password?

Open ilyadavydyuk opened this issue 10 years ago • 6 comments

in rake console, when i try find user with id = 1 - i get 'nil'.

ilyadavydyuk avatar Oct 05 '16 06:10 ilyadavydyuk

Could you provide more information of your docker setup ?

solidnerd avatar Oct 16 '16 10:10 solidnerd

@ilyadavydyuk is this still an active topic ? If not could you close the case.

gjrtimmer avatar Nov 23 '16 07:11 gjrtimmer

@ilyadavydyuk plz try this method, perform

  1. docker exec -it GITLAB_CONTAINER_ID /bin/bash 2.su - git 3.cd gitlab 4.bundle exec rails c production user = User.find_by_email("ROOT_EMAIL") user.password = 'NEW_PASS' user.password_confirmation = 'NEW_PASS' user.save exit more details, plz refer to https://docs.gitlab.com/ee/security/reset_root_password.html

waterdrops avatar Jan 14 '17 09:01 waterdrops

I only had one user so I got it and made me admin.

user = User.first
user.admin = true
user.save!

kalaspuffar avatar Mar 09 '18 07:03 kalaspuffar

in case anyone else finds this and is having trouble like I was, the other method of finding the root user worked for me. user = User.where(id: 1).first (found this in the same page @waterdrops linked to above)

mhciael avatar Jun 06 '18 13:06 mhciael

This issue has been automatically marked as stale because it has not had any activity for the last 60 days. It will be closed if no further activity occurs during the next 7 days. Thank you for your contributions.

stale[bot] avatar May 07 '20 04:05 stale[bot]