If you used Docker to set up GitLab, the default root password is stored in a file within the container. To retrieve it, run the following command:
docker exec <gitlab-container-name> cat /etc/gitlab/initial_root_password