What is the special gitlab-ci-token user?

2019-03-24 16:48发布

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?

1条回答
可以哭但决不认输i
2楼-- · 2019-03-24 17:19

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

查看更多
登录 后发表回答