What is the special gitlab-ci-token user?

23,922

Gitlab acts as an authentication provider for the registry. gitlab-ci-token is a user automatically created for you. CI_BUILD_TOKEN is set automatically for each build by Gitlab-CI

Share:
23,922
user1447137
Author by

user1447137

Updated on April 17, 2020

Comments

  • user1447137
    user1447137 about 4 years

    The docs for gitlab's container registry (https://gitlab.com/help/container_registry/README.md) provide a config example with this instruction:

    - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.example.com

    and this explanation:

    You have to use the credentials of the special gitlab-ci-token user with its password stored in $CI_BUILD_TOKEN in order to push to the Registry connected to your project. This allows you to automated building and deployment of your Docker images.

    I cannot find any documentation about this special gitlab-ci-token user, nor about the $CI_BUILD_TOKEN var.

    What is this special user? Is it automatically available? Does it have to be defined somewhere? What value should be given to the $CI_BUILD_TOKEN var?