Not able to login to gitlab registry

Dear Giltab community,

I have a local gitlab ce instance running, local authentication is disabled and I can only login through oidc. I also have my personal token with api and repository write scope enabled. I tested it by doing git push/pull and works.

I also enabled gitlab registry adding this entry

registry_external_url 'http://gitlab.local:5050'

NOTE: url is in http because I am using the gitlab container to run it in k8s, my service mesh stops https and forwards request in plain http to gitlab service

My problem is that I am unable to login to the registry. I tried:

docker login -u <my gitlab username> -p <my personal access token> gitlab.local:5050

and I get as response:

WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: Get "https://gitlab.local:5050/v2/": denied: access forbidden

This is what I can see in the logs

2022-04-04_16:05:35.75381 time="2022-04-04T16:05:35.753Z" level=warning msg="error authorizing context: authorization token required" ...

thank you very much