Is this a docs issue?
Type of issue
Information is incorrect
Description
Could a note be added that GIT_AUTH_HEADER and GIT_AUTH_TOKEN cannot be used with a GitLab CI_JOB_TOKEN. A GitLab CI_JOB_TOKEN MUST use basic authentication and use a username of gitlab-ci-token.
Buildkit appears to hard code a username for basic auth which causes the CI_JOB_TOKEN authentication to fail.
In short this functionality is only compatible with Personal Access Tokens (which should include group/project access tokens also).
See also moby/buildkit#5703
Location
https://docs.docker.com/build/building/secrets/
Suggestion
Either update the doc or consider allowing override of the hardcoded x-access-token.
Is this a docs issue?
Type of issue
Information is incorrect
Description
Could a note be added that
GIT_AUTH_HEADERandGIT_AUTH_TOKENcannot be used with a GitLab CI_JOB_TOKEN. A GitLabCI_JOB_TOKENMUST use basic authentication and use a username ofgitlab-ci-token.Buildkit appears to hard code a username for basic auth which causes the CI_JOB_TOKEN authentication to fail.
In short this functionality is only compatible with Personal Access Tokens (which should include group/project access tokens also).
See also moby/buildkit#5703
Location
https://docs.docker.com/build/building/secrets/
Suggestion
Either update the doc or consider allowing override of the hardcoded
x-access-token.