gitlab runner使用docker报错(x509: certificate signed by unknown authority)定位
如果gitlab runner使用docker,docker是普通配置,配置好后,runner就可以正常执行任务了。
另外一个环节Docker配置了tls加密连接,添加runner后,runner的配置tls_verify 字段值为true:
tls_verify = true
执行任务时则会报错:
ERROR: Preparation failed: error during connect: Get https://127.0.0.1:2376/v1.25/info: x509: certificate signed by unknown authority (executor_docker.go:979:0s)
搜索错误原因,提示是docker找不到tls相关的证书,但是git-runner的主机上已经配置好了证书,docker命令可以正常执行。
仔细阅读gitlab文档,在https://docs.gitlab.com/runner/configuration/advanced-configuration.html里发现了tls_cert_path这个参数,
用来配置tls证书的路径的。
在gitlab-runner的配置文件路径下/etc/gitlab-runner/config.toml,打开文件,
在runner中配置runner.docker的tls_cert_path字段值为tls文件所在路径,然后重启gitlab-runner即可
[[runners]]
name = "root_test2"
url = "http://10.10.10.10/"
token = "df6bcfdbb75332d19a7712ca23b130"
executor = "docker"
[runners.custom_build_dir]
[runners.docker]
host = "tcp://127.0.0.1:2376"
tls_verify = true
tls_cert_path = "/root/.docker/"
image = "gitlab:lasted"
privileged = false
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
volumes = ["/root/.docker:/root/.docker","/cache"]
shm_size = 0
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
gitlab runner使用docker报错(x509: certificate signed by unknown authority)定位的更多相关文章
- docker push 出现:x509: certificate signed by unknown authority
今天,部署生产的程序的时候,出现一个问题:编译正常,但是,docker 把编译好的image 推送到生产环境上去的时候,出现:x509: certificate signed by unknown a ...
- docker从私有镜像库pull/push镜像问题:Error response from daemon: Get https://xxxx.com/: x509: certificate signed by unknown authority
docker从私有镜像库pull/push镜像问题:Error response from daemon: Get https://harbor.op.xxxx.com/v2/: x509: cert ...
- 解决go mod或go get时`x509: certificate signed by unknown authority`错误
一般go get私有仓库时会出现如下错误: go: xxx@v0.0.0-20190918102752-bb51b27911ca: unrecognized import path "xxx ...
- Unable to connect to the server: x509: certificate signed by unknown authority
0x00 Problem 在使用二进制搭建 k8s 集群的过程中,使用 kubectl get 等操作时始终显示 x509: certificate signed by unknown authori ...
- golang GET 出现 x509: certificate signed by unknown authority
我们编写一个Go程序来尝试与这个HTTPS server建立连接并通信. //gohttps/4-https/client1.gopackage main import ( "fmt& ...
- docker报错: x509: certificate has expired or is not yet valid
环境:最小化安装centos7 问题:docker 启动没问题,但是查询 镜像时报错 Error response from daemon: Get https://index.docker.io/v ...
- x509: certificate signed by unknown authority harbor 架构图
默认时,client 与 Registry 的交互是通过 https 通信的.在 install Registry 时,若未配置任何tls 相关的 key 和 crt 文件,https 访问必然失败. ...
- go使用websocket遇到dial:x509: certificate signed by unknown authority
websocket.DefaultDialer.Dial(url, headers) 改为 websocket.Dialer{TLSClientConfig: &tls.Config{Root ...
- Docker 报错 error during connect: Get pipe/docker_engine: The system cannot find the file specified. - 摘要: 本文讲的是Docker 报错 error during connect: Get pipe/dock
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.37/version: open //./pipe/docker_ ...
随机推荐
- 【HttpClient】使用学习
HttpClient使用学习 HttpClient Tutorial:http://hc.apache.org/httpcomponents-client-4.5.x/tutorial/html/in ...
- 初探three.js几何体
今天说说three.js的几何体,常见的几何体今天就不说了,今天说一说如何画直线,圆弧线,以及高级几何体. 1. 画一条直线 画直线我们使用THREE.Geometry()对象. //给空白几何体添加 ...
- Caffe源码-Solver类
Solver类简介 Net类中实现了网络的前向/反向计算和参数更新,而Solver类中则是对此进行进一步封装,包含可用于逐次训练网络的Step()函数,和用于求解网络的优化解的Solve()函数,同时 ...
- LeetCode刷题总结-树篇(上)
引子:刷题的过程可能是枯燥的,但程序员们的日常确不乏趣味.分享一则LeetCode上名为<打家劫舍 |||>题目的评论: 如有兴趣可以从此题为起点,去LeetCode开启刷题之 ...
- 《CSAPP》实验二:二进制炸弹
二进制炸弹是第三章<程序的机器级表示>的配套实验,这章主要介绍了x64汇编,包括:操作数的表示方式,数据传送指令,算术和逻辑指令,控制流跳转指令,过程(procedure)的实现与运行时栈 ...
- python的tqdm模块介绍
https://www.jianshu.com/p/b27318efdb7b Tqdm 是 Python 进度条库,可以在 Python 长循环中添加一个进度提示信息用法:tqdm(iterator) ...
- SpringBoot整合dubbo(yml格式配置)
yml文件 如果只作为服务的消费者不用暴露端口号,扫描的包名根据自己service改 dubbo: application: name: springboot-dubbo-demo #应用名 regi ...
- Ligg.EasyWinApp-000: 一款Windows应用编程框架介绍
本框架(解决方案)是一个Windows应用编程框架和UI库,通过该框架,不需任何代码,通过XML配置文件,搭建任意复杂的Windows应用界面,以类似Execel公式的方式实现基本的过程控制( ...
- js获取当前时间的年月日时分秒以及时间的格式化
1.获取当前时间 var myDate = new Date(); 2.获取时间中的年月日时分秒 myDate.getYear(); // 获取当前年份(2位) myDate.getFullYear( ...
- 重启docker服务应用,自启停命令.
#重启docker服务应用,不自动开启docker容器 docker update --restart=no (docker容器CONTAINER ID 或 docekr容器NAMES) #重启doc ...