昨天,我的shell执行器在默认测试yml中运行良好:
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但现在我得到了以下错误:
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这是我无法理解的,因为有三件事:
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发布于 2018-01-12 09:38:43
在这种情况下,我重新启动了debian机器,它重置了主机名.所以没有主机名使得gitlab在默认情况下使用IP ..。
检查ip,因为SSL证书使它找不到它.
不知道为什么每次我重新启动linux机器时它都会丢失我的主机名,但这就是.
发布于 2018-10-23 13:37:04
我和gitlab跑步者的连接也有同样的错误.因此,我在.gitlab-ci.yml中添加了
variables:
GIT_SSL_NO_VERIFY: "true"而gitlab runner能够连接并克隆回购。
https://stackoverflow.com/questions/48222375
复制相似问题