在 Ubuntu 上安裝 gitlab docker ,非常簡單方便;
安裝方法:GitLab Docker images | GitLab
根據提示,可以直到 root 的默認密碼在: /srv/gitlab/config/initial_root_password
一般保存一下這個文件;# NOTE: This file will be automatically deleted in the first reconfigure run after 24 hours.
根據 這個文件,可以知道,如果 root 密碼忘記可以到這里查看處理;
# WARNING: This value is valid only in the following conditions
# 1. If provided manually (either via `GITLAB_ROOT_PASSWORD` environment variable or via `gitlab_rails['initial_root_password']` setting in `gitlab.rb`, it was provided before database was seeded for the first time (usually, the first reconfigure run).
# 2. Password hasn't been changed manually, either via UI or via command line.
#
# If the password shown here doesn't work, you must reset the admin password following
這里說明了一般密碼重置的方法;
https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password.
這里說明一下:
在 通過 docker 安裝 gitlab,重新設置 root 密碼方法:
1: sudo docker ps -a //查看 gitlab docker id;
2: docker exec -it gitlabContainerId /bin/bash //https://docs.gitlab.com/ee/administration/operations/rails_console.html
3: gitlab-rails console -e production // 等待啟動,一個Ruby 表格;
4:user.password = 't12345678' //必須 字母 和 數(shù)組組合,大于8,否則保持錯誤;
5:user.password = '12345678'
6:user.password_confirmation = 't12345678'文章來源:http://www.zghlxwxcb.cn/news/detail-464753.html
7: user.save! //如果成功,提示 true, 否則提示 false,需要查看具體問題;文章來源地址http://www.zghlxwxcb.cn/news/detail-464753.html
到了這里,關于gitlab docker 忘記root密碼,重新設置的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網!