Problem to docker login to gitlab docker registry

Hello i have been looking for a solution to my issue for many days and i cant find any solution for this

I can login to my registry by command line on my ubuntu and i already pushed some image to there and i could see it in the gitlab webpage. So my gitlab docker registry is working.

docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $REGISTRY

I get the error below:

Error response from daemon: Get unauthorized: incorrect username or password
ERROR: Build failed: exit status 1
FATAL: exit status 1

is there any step i am missing? What should I do to use the command below?

Can anyone help me ?

There are a lot of issue i could find but i couldnt get my problem resolved.
I found out this new post but well should i do anything different ? is there a new settings which i should know ?

Thank you.

ok i have found the solution…

The problem is that using gitlab-runner it does not work to authenticate as it does to my gitlab user.

So i had to send it to production to see it really working. It was scary.