什么是特殊的 gitlab-ci-token 用户? [英] What is the special gitlab-ci-token user?

查看:86
本文介绍了什么是特殊的 gitlab-ci-token 用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

gitlab 容器注册表的文档(https://gitlab.com/help/container_registry/README.md) 提供带有此指令的配置示例:

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

还有这个解释:

您必须使用特殊 gitlab-ci-token 用户的凭据及其密码存储在 $CI_BUILD_TOKEN 中才能推送到连接到您的项目的注册表.这允许您自动构建和部署 Docker 映像.

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

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

这个特殊用户是什么?它是自动可用的吗?它必须在某个地方定义吗?$CI_BUILD_TOKEN 变量应该赋予什么值?

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?

推荐答案

Gitlab 充当注册表的身份验证提供程序.gitlab-ci-token 是自动为您创建的用户.CI_BUILD_TOKEN 由 Gitlab-CI 为每个构建自动设置

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

这篇关于什么是特殊的 gitlab-ci-token 用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆