Troubleshooting


Troubleshooting

GitLab comes with extensive troubleshooting guides

For example…

Sidekiq (job processor)

GitLab rails

…as well as tools…

gitlabsos (omnibus, docker)

kubesos

…and tracing across logs

Correlation IDs


Reset the root password

If you cannot log into GitLab using root

But you have access to the console

Use gitlab-rake:

docker compose --project-name gitlab exec gitlab \
    gitlab-rake "gitlab:password:reset[root]"

SSH

Retrieve users public keys:

curl -s http://gitlab.<DOMAIN>/<USERNAME>.keys

Find user for SSH private key:

$ ssh -T -i id_rsa git@gitlab.<DOMAIN>
Welcome to GitLab, @<USERNAME>!

Debug SSH connection and authentication:

ssh -Tvvv -i id_rsa git@gitlab.<DOMAIN>

Find user for given SSH key fingerprint:

curl --silent --header "Private-Token: admin-private-token" \
    https://gitlab.example.com/api/v4/keys?fingerprint=d0:6d:2e:bb:fb:27:f1:6e:80:6c:16:b2:be:c6:d8:00 \
| jq

Tokens

Find owner of access token

Access Token

Example for personal access token:

curl -sH "Private-Token: <TOKEN>" http://gitlab.<DOMAIN>/api/v4/user \
| jq -r .username
<USERNAME>

Example for group access token (group ID 6):

curl -sH "Private-Token: <TOKEN>" http://gitlab.<DOMAIN>/api/v4/user \
| jq -r .username
group_6_bot

Deploy Token

No known way to find group or project… except for log parsing for requests