Failed to push image to registry by runner

Hello, after yesterday we have a ci-cd pipeline problem on one repository, other are ok.

$ docker login -u “$CI_REGISTRY_USER” -p “$CI_REGISTRY_PASSWORD” $CI_REGISTRY
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: Get “https://registry.gitlab.com/v2/”: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

or

$ docker login -u “$CI_REGISTRY_USER” -p “$CI_REGISTRY_PASSWORD” $CI_REGISTRY
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
docker login | Docker Docs
Login Succeeded
$ docker build -t $CI_REGISTRY_IMAGE/$CI_COMMIT_BRANCH:$CI_COMMIT_SHORT_SHA .
…skip lines…
$ docker push $CI_REGISTRY_IMAGE/$CI_COMMIT_BRANCH:$CI_COMMIT_SHORT_SHA
The push refers to repository [registry.gitlab.com/company-name/project-name/repo-name/branch-name]
Get “https://registry.gitlab.com/v2/”: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

or

$ docker push $CI_REGISTRY_IMAGE/$CI_COMMIT_BRANCH:$CI_COMMIT_SHORT_SHA
The push refers to repository [registry.gitlab.com/company-name/project-name/repo-name/branch-name]
369b39ee5388: Preparing
a6ef96115c0c: Preparing
…skip lines…
a6ef96115c0c: Retrying in 5 seconds
…skip lines…
a6ef96115c0c: Retrying in 1 second
error parsing HTTP 403 response body: unexpected end of JSON input: “”

Yesterday I thought it is gitlab api failure, but today I checked other repos and did not find a problems.
After that I “steal” gitlab-ci-token password from k8s gitlab runner secret while it running and used it to login and manually push image to repo, and this is working, so I dunno why runner can’t push it by yourself!

What a hell?

I was able to mitigate issue by replacing $CI_REGISTRY variable in docker login by static “https://registry.gitlab.com/v2/”. Dunno why it helped. Dunno why manual login and other pipelines working with $CI_REGISTRY.