diff options
Diffstat (limited to 'doc/user/packages/composer_repository')
-rw-r--r-- | doc/user/packages/composer_repository/index.md | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/user/packages/composer_repository/index.md b/doc/user/packages/composer_repository/index.md index 215855d6be4..d8662ef6512 100644 --- a/doc/user/packages/composer_repository/index.md +++ b/doc/user/packages/composer_repository/index.md @@ -134,6 +134,7 @@ Prerequisites: with the scope set to, at minimum, `api`. - A [deploy token](../../project/deploy_tokens/index.md) with the scope set to `read_package_registry`, `write_package_registry`, or both. + - A [CI/CD Job token](../../../ci/jobs/ci_job_token.md) To install a package: @@ -221,6 +222,26 @@ To install a package: } ``` + Using a CI/CD job token: + + ```shell + composer config gitlab-token.<DOMAIN-NAME> gitlab-ci-token ${CI_JOB_TOKEN} + ``` + + Result in the `auth.json` file: + + ```json + { + ... + "gitlab-token": { + "<DOMAIN-NAME>": { + "username": "gitlab-ci-token", + "token": "<ci-job-token>", + ... + } + } + ``` + You can unset this with the command: ```shell |