Skip to content

GIT_AUTH_TOKEN cannot be used with GitLab CI_JOB_TOKEN #22834

Open
@Habile2019

Description

@Habile2019

Is this a docs issue?

  • My issue is about the documentation content or website

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.

Metadata

Metadata

Labels

area/buildRelates to Dockerfiles or docker build commandstatus/triageNeeds triage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions