什么是特殊的gitlab-ci-token用户?

时间:2016-05-26 18:04:19

标签: docker gitlab gitlab-ci gitlab-ci-runner

gitlab的容器注册表(https://gitlab.com/help/container_registry/README.md)的文档提供了一个配置示例,其中包含以下指令:

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

和这个解释:

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.

我找不到关于此特殊gitlab-ci-token用户的任何文档,也找不到$CI_BUILD_TOKEN var。

的文档

这个特殊用户是什么?它是自动可用的吗?是否必须在某处定义?应该给$CI_BUILD_TOKEN var?

赋予什么价值

3 个答案:

答案 0 :(得分:11)

Gitlab充当注册表的身份验证提供程序。 gitlab-ci-token是自动为您创建的用户。 Gitlab-CI

为每个构建自动设置CI_BUILD_TOKEN

答案 1 :(得分:0)

就我而言,upgrading of gitlab-runner帮助了我

答案 2 :(得分:0)

在我看来,这CI-permission

有效

因此,使用用户信用作为gitlab-ci-token和由他们创建的$ CI_BUILD_TOKEN。

  • 开发人员有权访问可以运行CI作业的项目的任何人都可以读取该令牌,从而允许开发人员为该项目注册任何特定的Runner。
  • 令牌将仅允许访问项目的源,禁止访问任何其他项目。
相关问题