Trying to log in into but got error message from

I am trying to log in into gitlab container registry in one of my CI jobs, but I get an error message telling me that I cannot log in into

I am a bit confused, as I am not doing anything different from what I have been doing in the past. What am I doing wrong?

I double-checked that the variables (especially $CI_REGISTRY) is set correctly, that’s the output of my debug lines:

$ echo $IMAGE_NAME
$ docker version
 Version:           24.0.6
 API version:       1.43

I am using, docker:latest and docker:dind in my Job.

Hi @paulwellnerbou :wave:

I think what’s happening here is $CI_BUILD_TOKEN isn’t set, so the shell is using $CI_REGISTRY as the ‘password’ and trying to auth to the ‘default’ registry instead.

The correct variable appears to be $CI_REGISTRY_PASSWORD which is a copy of $CI_JOB_TOKEN. (Found this here)

Hope this helps :slight_smile:

1 Like

Oh, my… :man_facepalming:

Of course, you’re right! I checked the CI_REGISTRY variable if it was changed, which was not the case. But of course the other one.