-- 前回 --
-- 今回 --
gitlab-ce の起動まで漕ぎつけたので、早速ログインしようとしてみる。。。
だが、パスワードが分からない。
色々と調べてみると、GitLabの初期パスワードは /etc/gitlab/initial_root_password に記載されているらしい。
コンテナへ接続して、確認してみる。
まずはコンテナ名の確認。
① コンテナ名の確認
[root@git-server gitlab]# podman ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
422d717db105 quay.io/podman/hello:latest /usr/local/bin/po... 3 months ago Exited (0) 3 months ago pedantic_chaplygin
9d4d18a09f55 docker.io/gitlab/gitlab-ce:18.0.4-ce.0 /assets/init-cont... 2 weeks ago Up 14 minutes (healthy) 0.0.0.0:8080->80 /tcp, 0.0.0.0:8443->443/tcp, 0.0.0.0:10022->22/tcp gitlab
0309f185eb74 docker.io/gitlab/gitlab-runner:alpine3.18-bleeding run --user=gitlab... 2 weeks ago Up 14 minutes gitlab-runner
[root@git-server gitlab]#
名前が分かったので接続。
② gitlab-ce へ接続して、initial_root_password の確認
[root@git-server gitlab]# podman-compose exec gitlab bash
root@gitlab:/#
root@gitlab:/# ls -ltr /etc/gitlab/
total 196
-rw------- 1 root root 158163 Sep 23 09:50 gitlab.rb
-rw-r--r-- 1 root root 577 Sep 23 09:50 ssh_host_rsa_key.pub
-rw------- 1 root root 2610 Sep 23 09:50 ssh_host_rsa_key
-rw-r--r-- 1 root root 185 Sep 23 09:50 ssh_host_ecdsa_key.pub
-rw------- 1 root root 513 Sep 23 09:50 ssh_host_ecdsa_key
-rw-r--r-- 1 root root 105 Sep 23 09:50 ssh_host_ed25519_key.pub
-rw------- 1 root root 419 Sep 23 09:50 ssh_host_ed25519_key
drwxr-xr-x 2 root root 6 Sep 23 09:51 trusted-certs
-rw------- 1 root root 16316 Oct 12 08:51 gitlab-secrets.json
しかし、/etc/gitlab/initial_root_password がない。。。
initial_root_password は、GitLabの初回起動後、24時間でなくなるらしく、断念。
日本語マニュアルに従い、パスワードのリセットを試みる。
③ パスワードのリセット
root@gitlab:/# gitlab-rake "gitlab:password:reset[root]"
Enter password:
Confirm password:
Password successfully updated for user with username root.
ブラウザから ユーザ名:root、パスワード:新しく設定したパスワード を入力することで、ログインできた。
-- 参考(先人達に感謝) --

