Skip to content

Instantly share code, notes, and snippets.

@kymtwyf
Created January 20, 2016 06:39
Show Gist options
  • Save kymtwyf/937e31b36afb21ed908e to your computer and use it in GitHub Desktop.
Save kymtwyf/937e31b36afb21ed908e to your computer and use it in GitHub Desktop.
gitlab重置 root 密码

参考 Reference

1.到 gitlab 安装路径 && gitlab-rails console production

cd YOUR_GITLAB_PATH && sudo gitlab-rails console production

2.

u=User.where(id:1).first

3.

u.password = 'YOUR_PASSWORD' u.password_confirmation = 'YOUR_PASSWORD'

4.

u.save!

DONE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment