首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Gitlab-runner shell执行器突然出现ssl错误

Gitlab-runner shell执行器突然出现ssl错误
EN

Stack Overflow用户
提问于 2018-01-12 08:36:10
回答 2查看 663关注 0票数 0

昨天,我的shell执行器在默认测试yml中运行良好:

代码语言:javascript
复制
stages:
  - test
  - build
  - deploy

test:
  stage: test
  script: echo "Running tests"

build:
  stage: build
  script: echo "Building the app"

deploy_staging:
  stage: deploy
  script:
    - echo "Deploy to staging server"
    - export
  environment:
    name: staging
    url: https://staging.example.com
  only:
  - master

但现在我得到了以下错误:

代码语言:javascript
复制
Running with gitlab-runner 10.3.0 (5cf5e19a)
  on gitlab01ShellSQLRunner (9ec36953)
Using Shell executor...
Running on debian...
Cloning repository...
Cloning into '/home/gitlab-runner/builds/9ec36953/0/dev/SQL'...
fatal: unable to access 'https://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@10.45.18.14/dev/SQL.git/': SSL: certificate subject name (Gitlab01) does not match target host name '10.45.18.14'
ERROR: Job failed: exit status 1

这是我无法理解的,因为有三件事:

  1. 跑步者url是https://gitlab01 (为什么突然使用ip?)
  2. ip匹配url https://gitlab01.YXNET.local ~别名https://gitlab01
  3. 它昨天起作用了:
代码语言:javascript
复制
Running with gitlab-runner 10.3.0 (5cf5e19a)
  on gitlabShellRunner (d36a5267)
Using Shell executor...
Running on debian...
Fetching changes...
HEAD is now at 6e9a125 added CI/CD file
From https://gitlab01/dev/SQL
   6e9a125..84de9fd  master     -> origin/master
Checking out 84de9fd7 as master...
Skipping Git submodules setup
$ echo "Running tests"
Running tests
Job succeeded
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2018-01-12 09:38:43

在这种情况下,我重新启动了debian机器,它重置了主机名.所以没有主机名使得gitlab在默认情况下使用IP ..。

检查ip,因为SSL证书使它找不到它.

不知道为什么每次我重新启动linux机器时它都会丢失我的主机名,但这就是.

票数 0
EN

Stack Overflow用户

发布于 2018-10-23 13:37:04

我和gitlab跑步者的连接也有同样的错误.因此,我在.gitlab-ci.yml中添加了

代码语言:javascript
复制
variables:
       GIT_SSL_NO_VERIFY: "true"

而gitlab runner能够连接并克隆回购。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48222375

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档