GitLab comes with extensive troubleshooting guides
If you cannot log into GitLab using root
But you have access to the console
Use gitlab-rake
:
docker exec -it gitlab gitlab-rake "gitlab:password:reset[root]"
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 owner of 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
No known way to find group or project