gitlab-runner 注册问题

Bertha 。 2022-02-28 12:06 575阅读 0赞

系统:Ubuntu 18.04.1 LTS

gitlab版本:11.9

使用gitlab服务器域名:https://gitlab.example.com

需要使用到url和token:gitlab服务器地址+/admin/runners

watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM0MjA2NTYw_size_16_color_FFFFFF_t_70

要在GNU / Linux下注册Runner:

  1. 运行以下命令:

    1. gitlab-runner register
  2. 输入您的GitLab实例URL:

    1. Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com )
    2. https://gitlab.com
  3. 输入您获得的令牌以注册Runner:

    1. Please enter the gitlab-ci token for this runner
    2. xxx
  4. 输入Runner的描述,您可以稍后在GitLab的UI中更改:

    1. Please enter the gitlab-ci description for this runner
    2. [hostame] my-runner
  5. 输入与Runner关联的标签,您可以稍后在GitLab的UI中更改:

    1. Please enter the gitlab-ci tags for this runner (comma separated):
    2. my-tag,another-tag
  6. 输入Runner执行程序:

    1. Please enter the executor: ssh, docker+machine, docker-ssh+machine, kubernetes, docker, parallels, virtualbox, docker-ssh, shell:
    2. docker
  7. 如果您选择Docker作为执行程序,则会要求您将默认图像用于未在其中定义的项目.gitlab-ci.yml

    1. Please enter the Docker image (eg. ruby:2.1):
    2. alpine:latest

    第五步报错,报错信息如下:

    ERROR: Registering runner… failed runner=6HkNBVen status=couldn’t execute POST against https://gitlab.example.com/api/v4/runners: Post https://gitlab.example.com/api/v4/runners: x509: certificate signed by unknown authority
    PANIC: Failed to register this runner. Perhaps you are having network problems

证书签名错误,在网上找了许多办法还是不行,解决办法:

  1. gitlab-runner register \
  2. --non-interactive \
  3. --tls-ca-file=/etc/gitlab/ssl/gitlab.example.com.crt \
  4. --url "https://gitlab.example.com/" \
  5. --registration-token "6HkNBVenPd9sMyd2HzhK" \
  6. --executor "docker" \
  7. --docker-image maven:latest \
  8. --description "runner " \
  9. --tag-list "run" \
  10. --run-untagged \
  11. --locked="false"

找到gitlab文件夹下,就看到了,把证书文件带上

20190325185225857.png

其他版本注册方式:

https://docs.gitlab.com/11.9/runner/register/index.html

发表评论

表情:
评论列表 (有 0 条评论,575人围观)

还没有评论,来说两句吧...

相关阅读

    相关 kaggle注册问题

    kaggle注册的时候会要求输入验证码,但是页面并不会弹出验证码,上网查了下发现需要翻//墙,但是不 是每一个人都会翻//墙,所以在这儿说一下我的办法,希望能够帮到各位,省的

    相关 "对象库未注册"问题

    ![Center][] 这几天进行机房收费系统的报表问题,在添加部件时,出现了如上的错误“对象库未注册”。然后又试着重新添加部件,发现还是一样。之后请教高人,问题解决了,其