diff options
Diffstat (limited to 'doc/user/project/new_ci_build_permissions_model.md')
-rw-r--r-- | doc/user/project/new_ci_build_permissions_model.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/user/project/new_ci_build_permissions_model.md b/doc/user/project/new_ci_build_permissions_model.md index d1bb23396e4..4217fc792d7 100644 --- a/doc/user/project/new_ci_build_permissions_model.md +++ b/doc/user/project/new_ci_build_permissions_model.md @@ -101,14 +101,14 @@ allowing pulling and pushing Docker images from within the CI job. GitLab would create a special checkout URL like: -``` +```plaintext https://gitlab-ci-token:<project-runners-token>/gitlab.com/gitlab-org/gitlab-foss.git ``` And then the users could also use it in their CI jobs all Docker related commands to interact with GitLab Container Registry. For example: -``` +```shell docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com ``` @@ -173,14 +173,14 @@ As a user: The [Job environment variable][jobenv] `CI_JOB_TOKEN` can be used to authenticate any clones of dependent repositories. For example: -``` +```shell git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/<user>/<mydependentrepo>.git ``` It can also be used for system-wide authentication (only do this in a docker container, it will overwrite ~/.netrc): -``` +```shell echo -e "machine gitlab.com\nlogin gitlab-ci-token\npassword ${CI_JOB_TOKEN}" > ~/.netrc ``` |