GitLab Pipelines can't push to the internal docker registry using GITLAB_PROJECT_TOKEN (Access denied)

Something broke between Dec 22, 2020 12:55pm GMT+0100 and 9:01pm GMT+0100 (13.7.0-ee upgrade), doesn't work since then.

echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$GITLAB_PROJECT_USER\",\"password\":\"$GITLAB_PROJECT_TOKEN\"}}}" > /kaniko/.docker/config.json
/kaniko/executor --whitelist-var-run="false" --context $CI_PROJECT_DIR/output --dockerfile $CI_PROJECT_DIR/output/Dockerfile.$GROUP --destination $CI_REGISTRY_IMAGE:$GROUP-$CI_COMMIT_REF_SLUG`

error checking push permissions -- make sure you entered the correct tag name, and that you are authenticated correctly, and try again: checking push permission for "gitlab.archlinux.org:5050/archlinux/archlinux-docker:base-master": creating push check transport for gitlab.archlinux.org:5050 failed: GET https://gitlab.archlinux.org/jwt/auth?scope=repository%3Aarchlinux%2Farchlinux-docker%3Apush%2Cpull&service=container_registry: UNAUTHORIZED: HTTP Basic: Access denied

First failed job: https://gitlab.archlinux.org/archlinux/archlinux-docker/-/jobs/11975

Seems to be this one:

| 2020-12-23T11:28:46.000 | svenstaro | hashworks: https://gitlab.com/gitlab-org/gitlab/-/issues/259663#note_472836857

Note that this breaks automatic Arch Linux docker builds both for the official and the our repo.

Edited by hashworks