mirror of
https://github.com/docker/docs.git
synced 2026-10-23 18:09:02 +03:00
Merge pull request #24766 from Nedunchezhiyan-M/fix/build-git-auth-token-ci-job-token-note
build: note that GIT_AUTH_TOKEN is incompatible with GitLab CI_JOB_TOKEN
This commit is contained in:
@@ -194,6 +194,13 @@ To authenticate the builder to GitHub, set the `GIT_AUTH_TOKEN`
|
||||
environment variable to contain a valid GitHub 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=$(gh auth token) docker build \
|
||||
--secret id=GIT_AUTH_TOKEN \
|
||||
|
||||
Reference in New Issue
Block a user