Tag: gitlab ci runner

由于“未经授权:需要身份validation”,使用gitlab,docker push失败

尝试使用gitlab-runner推送到Gitlabregistry时出现以下错误: unauthorized: authentication required ERROR: Build failed: exit status 1 虽然: $ docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN git.COMPANY.com Login Succeeded 从我的本地环境工程构build和推送就好了,提示问题与运行的主机(gitlab-ci3)有关,也可能是正在使用的用户: $ echo $USER gitlab-runner 在组中: docker:x:999:gitlab-runner gitlab-runner:x:998: 我已经尝试docker未经授权:身份validation要求 – 推成功login后,但没有成功。 也许这个gitlab-runner没有根权限config.json的原因是什么? $ cat /root/.docker/config.json cat: /root/.docker/config.json: Permission denied 除了解决这个问题之外,如果您能够为我提供如何在未来更好地debugging这个错误,这将是非常有帮助的。 我使用的是GitLab企业版8.13.1-ee,Docker 1.12.3,gitlab-ci-multi-runner 1.7.1 Gitlab输出: Running with gitlab-ci-multi-runner 1.7.1 (f896af7) Using Shell executor… Running on […]

Gitlab的运行与语法错误

我最近使用docker image gitlab / gitlab-runner:9.1.0与gitlab容器一起使用了一些CI。 发生错误,并build议使用不同版本的类似支持请求,所以我尝试了:latest和一些:1.11了。 不幸的是它一直告诉我这个错误: Running with gitlab-ci-multi-runner 1.11.4 (5e7ba4a) on foo (02cdacdc) Using Docker executor with image pretzlaw/php:7.1-apache … Starting service mariadb:latest … Pulling docker image mariadb:latest … Waiting for services to be up and running… Pulling docker image pretzlaw/php:7.1-apache … Running on runner-02cdacdc-project-7-concurrent-0 via 9d1d33dc9212… Fetching changes… HEAD is now at […]

错误:注册跑步者。 禁止(检查注册标记)

我正在尝试为GitLab CIconfiguration一个新的运行器,并且不断收到错误信息 错误:注册runner … forbidden(检查注册令牌)runner = 4PzD2eFb PANIC:注册失败 也许你有networking问题 这是我运行的命令 gitlab-ci-multi-runner register Please enter the gitlab-ci coordinator URL (eg https://gitlab.com/ci): https://gitlab.com/ci Please enter the gitlab-ci token for this runner: XXXXXXXXXXXX Please enter the gitlab-ci description for this runner: [gitlab-test]: runner Please enter the gitlab-ci tags for this runner (comma separated): docker 这也发生在我运行命令时 sudo gitlab-runner register […]

Gitlab亚军+自动缩放+缩放亚军选项

我正在使用gitlab runner和docker docker+machine执行程序来启动AWS上的自动运行的运行程序。 我想使用docker-in-docker设置跑步者内部的容器,但是我找不到如何为生成的跑步者定义所需的[runners.docker]属性来启用[runners.docker]使用。 是否有可能以某种方式将一些configuration信息传递给自动调整的跑步者?

GitLab CI sshregistrylogin

我有一个GitLab项目gitlab.com/my-group/my-project它有一个CIpipe道,build立一个图像,并将其推送到项目的GitLabregistryregistry.gitlab.com/my-group/my-project:tag 。 我想将此映像部署到Google Compute Engine,在那里我有一个运行docker的VM。 很容易做到手动通过ssh'ing进入虚拟机,然后docker login registry.gitlab.com和docker run … registry.gitlab.com/my-group/my-project:tag 。 除了docker login命令是交互式的,这对于CI来说是不可行的。 它可以在命令行上接受用户名和密码,但即使我的login信息在一个秘密variables (将我的GitLablogin凭证存储在GitLab秘密variables中? 这是pipe道Deploy阶段的预期工作stream程: 安装gcloud工具或使用预安装的映像 gcloud compute ssh my-gce-vm-name –quiet –command \ "docker login registry.gitlab.com && docker run registry.gitlab.com/my-group/my-project:tag" 由于gcloud命令将在GitLab CI Runner中运行,因此它可以访问秘密variables,但这真的是通过GitLab通过sshlogin到GitLab Registry的最佳方式吗?

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

gitlab的容器registry文档( https://gitlab.com/help/container_registry/README.md )提供了这个指令的configuration示例: – 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 。 […]

使用eirslett:frontend-maven-plugin在gitlab.com上运行maven

我有一个前端项目模块的maven项目,我用eirslett:frontend-maven-plugin包装。 它在当地工作正常,但在gitlab.com生成失败。 我用这个.gitlab-ci.yml启动构build: image: maven:3.3.9-jdk-8-onbuild build: script: "mvn clean install -B -X" 而这个pom.xml: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>fr.nev.oms</groupId> <artifactId>oms-frontend</artifactId> <packaging>jar</packaging> <parent> <groupId>fr.nev.oms</groupId> <artifactId>myproject</artifactId> <version>1.0.0-SNAPSHOT</version> </parent> <build> <plugins> <plugin> <groupId>com.github.eirslett</groupId> <artifactId>frontend-maven-plugin</artifactId> <version>1.3</version> <configuration> <!–<configuration>–> <nodeVersion>v4.4.7</nodeVersion> <npmVersion>3.10.5</npmVersion> <!–</configuration>–> <environmentVariables> <NODE_ENV>production</NODE_ENV> <API_URL></API_URL> <APP_VERSION></APP_VERSION> </environmentVariables> </configuration> <executions> <execution> <id>install node and npm</id> <goals> <goal>install-node-and-npm</goal> […]

Gitlab CI中使用Docker runner的代理问题

我想将我的Maven / Java应用程序打包到Docker Gitlab CI运行器中。 我在一个公司代理人的背后。 这是我的.gitlab-ci.yml : image: maven:3-jdk-7 build: script: "mvn clean package -B" 当一个构build被触发,我得到这个错误(在Gitlab生成控制台): 未知主机repo.maven.apache.org:名称或服务未知 – > [Help 1] 然后,我添加了 variables: http_proxy: http://user:pass@corp.proxy.ip:port 到.gitlab-ci.yml 。 但我得到另一个错误: 致命的:无法访问' http:// gitlab-ci-token:xxxxxx@170.20.20.20:8080 / myapp.git / ':请求的URL返回错误:504 当我注册Docker亚军时,select的Docker镜像是maven:3-jdk-7 。 我刚刚尝试添加no_proxyvariables作为值(Gitlab IP)172.20.20.20,但我得到相同的错误(第一个)。 我该如何解决? 有没有办法强制Docker亚军(容器)使用–net=host ?

无法为gitlab-ci运行构build

Gitlab无法完成项目的gitlab-ci构build。 显示它的日志无法连接到docker端点。 gitlab-ci-multi-runner 0.7.1(ee7a001)使用Docker执行器与图像ruby:2.1 …提取docker image mysql:latest … 错误:生成失败:无法连接到Docker端点 请提供一些解决scheme。