CI/CD job token
A short-lived token GitLab creates for each job, in CI_JOB_TOKEN, that lets the job call GitLab's API, registries and package registries.
In more detail
The token is valid only while the job runs and has the permissions of the user who started the pipeline, limited to the endpoints that accept it. Registries take it with the user name gitlab-ci-token. GitLab masks it in job logs.
Related terms
- predefined CI/CD variables — Variables GitLab sets in every job, such as CI_COMMIT_BRANCH, CI_COMMIT_SHA and CI_REGISTRY_IMAGE, describing the pipeline, the commit and the project.
- package registry — The registry in each GitLab project that stores packages such as npm, PyPI, Maven and generic files.
- masked variable — A CI/CD variable whose value GitLab replaces with [MASKED] wherever it appears in a job log.
Taught in
- The Container Registry: Build, Tag, Push, Clean Up — GitLab Certified CI/CD Associate Exam Prep
- Package Registries: Publishing With The Job Token — GitLab Certified CI/CD Associate Exam Prep
- Registering Runners And Routing Jobs With Tags — GitLab Certified CI/CD Associate Exam Prep