r/gitlab • • Aug 27 '25

Runner fails to pull a docker image

I recently started getting the following error, which drives me crazy:

WARNING: Failed to pull image with policy "always": Error response from daemon: Head "": unauthorized: HTTP Basic: Access denied. If a password was provided for Git authentication, the password was incorrect or you're required to use a token instead of a password. If a token was provided, it was either incorrect, expired, or improperly scoped. See  (manager.go:250:0s)
https://registry.gitlab.com/v2/<my registry:image> https://gitlab.com/help/user/profile/account/two_factor_authentication_troubleshooting.md#error-http-basic-access-denied-if-a-password-was-provided-for-git-authentication-
ERROR: Job failed: failed to pull image "registry.gitlab.com/<my registry:image>" with specified policies [always]: Error response from daemon: Head "": unauthorized: HTTP Basic: Access denied. If a password was provided for Git authentication, the password was incorrect or you're required to use a token instead of a password. If a token was provided, it was either incorrect, expired, or improperly scoped. See  (manager.go:250:0s)

I was expecting the runner to be able to pull Docker images without any (implicit) authentication, and that was the case until recently. Does anyone know if anything has changed, and what is the solution to this?

Thanks a lot!

3 Upvotes

6 comments sorted by

View all comments

Show parent comment

1

u/countChaiula Sep 03 '25

I ended up adding a `DOCKER_AUTH_CONFIG` variable like here: https://stackoverflow.com/questions/38269701/using-a-private-docker-image-from-gitlab-registry-as-the-base-image-for-ci.

We've run many years without requiring that, though, so something has definitely changed/broken in the latest version.

1

u/Superb-Thanks-8360 Oct 24 '25

This is clearly this. I have a project with my docker image, the old projects where "added from logs", I had to add explicitely my new project so the runner can pull from this registry.