Today I Learned: 17/09/2021 - Logging into and pulling from Gitlab Container Registry
Publish date: 17 Sep 2021
Several projects in my Gitlab are built into Docker images and pushed to the Gitlab repo’s container registry. I’ve recently been unable to pull those images without logging in to the registry. One of the ways to do this is with a personal access token, which you can issue for your user via the Gitlab preferences. The access token will need at least api permissions. Once you have a token, you can login to your Gitlab container registry like so:
docker login -u GITLAB_USERNAME -p ACCESS-TOKEN registry.gitlab.com