mirror of
https://github.com/docker/docs.git
synced 2026-10-23 18:09:02 +03:00
build: note that GIT_AUTH_TOKEN is incompatible with GitLab CI_JOB_TOKEN
GitLab CI job tokens require Basic authentication with the username gitlab-ci-token, but BuildKit always uses x-access-token as the username for Basic auth. This makes GIT_AUTH_TOKEN and GIT_AUTH_HEADER unusable with CI_JOB_TOKEN. Users must use a Personal Access Token. Fixes #22834
This commit is contained in:
@@ -194,6 +194,13 @@ To authenticate the builder to the Git server, set the `GIT_AUTH_TOKEN`
|
||||
environment variable to contain a valid GitLab access token, and pass it as a
|
||||
secret to the build:
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> `GIT_AUTH_TOKEN` and `GIT_AUTH_HEADER` are not compatible with GitLab's
|
||||
> `CI_JOB_TOKEN`. GitLab CI job tokens require Basic authentication with the
|
||||
> username `gitlab-ci-token`, but BuildKit always uses `x-access-token` as the
|
||||
> username for Basic auth. Use a Personal Access Token instead.
|
||||
|
||||
```console
|
||||
$ GIT_AUTH_TOKEN=$(cat gitlab-token.txt) docker build \
|
||||
--secret id=GIT_AUTH_TOKEN \
|
||||
|
||||
Reference in New Issue
Block a user