解决gitlab-ci 自动编译时 fatal: unable to access 'http://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx
最近项目的版本控制尝试使用 GIT ,并搭建了gitlab服务器,由于管理代码。并尝试使用gitlib的 CI/CD功能,实现项目的持续迭代部署。
在经历了痛苦的摸索尝试之后,终于能成功的编译部署项目。
但是在某次 网络管理员进行服务器网络维护时,把docker0的网络配置删除了。
导致使用gitlab-ci自动编译代码时报以下错误!
fatal: unable to access 'http://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@172.16.0.26/ihsp/unicorn-common.git/': Failed to connect to 172.16.0.26 port 80: Host is unreachable
Running with gitlab-ci-multi-runner 9.5.1 (96b34cc)on basicSC-pojo (1bb42af4)
Using Docker executor with image maven:3.5.3-jdk-8 ...
Using docker image sha256:92a89eeed32e806c4fbc21a7971a5d8f6a04936de1d8e7f3f68a1390f813febf for predefined container...
Pulling docker image maven:3.5.3-jdk-8 ...
Using docker image maven:3.5.3-jdk-8 ID=sha256:878388a112cc040e350e848dd39bf1cabc09653adb7ede6f050cbd16a7503de6 for build container...
Running on runner-1bb42af4-project-4-concurrent-0 via localhost.localdomain...
Cloning repository...
Cloning into '/builds/ihsp/basicSC-pojo'...
fatal: unable to access 'http://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@172.16.0.26/ihsp/basicSC-pojo.git/': Failed to connect to 172.16.0.26 port 80: Host is unreachable
ERROR: Job failed: exit code 1
由于对于linux 和gitlab-ci 肤浅了解,一直不知道是什么原因造成的。
先是重装了 gitlab-ci-multi-runner ,未能解决问题。
然后陷入思考,在详细查看错误之后,意识到这个错误是由于 docker 容器无法访问宿主主机导致的。
docker容器与宿主主机是默认是通过 docker0 网桥联通的。
于是重新配置docker0网桥
配置桥接网络停止docker服务
systemctl stop docker
关闭docker0桥接网卡
ip link set dev docker0 down设置桥接网络ip
ip addr add 172.16.0.199/24 dev docker0
启动docker0网卡
ip link set dev docker0 up启动docker服务
systemctl start docker
重新运行自动部署成功!问题解决!
解决gitlab-ci 自动编译时 fatal: unable to access 'http://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx相关推荐
- 解决git在push时报错fatal: unable to access ‘https://github.com/sup0C/a.git/‘: errno 10054
解决git在push时报错fatal: unable to access 'https://github.com/sup0C/a-repository-for--git/': OpenSSL SSL_ ...
- 解决git下载报错:fatal: unable to access ‘https://github.com/.../.git/‘:
解决git下载报错:fatal: unable to access 'https://github.com/-/.git/':- 1.在git中执行git config --global --unse ...
- gitlab上传代码报错fatal: unable to access ‘http://gitlab********‘: Could not resolve host: gitlab.******
fatal: unable to access 'http://gitlab.*******.git/': Could not resolve host: gitlab.***** 尝试输入命令行: ...
- 【Git】fatal: unable to access ‘http://gitlab.example.com/root/test_gitlab.git/‘: Could not resolve ho
给Ubuntu16配置gitlab之后,尝试通过浏览器访问gitlab官网,并创建了一个 报错之后如何解决? 未配置http://gitlab.example.com导致的,只需要将gitlab.ex ...
- Git-fatal: unable to access ‘https://gitlab.XX.git/‘: Could not resolve host: gitlab.XX.com.cn
克隆,提交代码 时报错如下: fatal: unable to access 'https://gitlab.XX.git/': Could not resolve host: gitlab.XX.c ...
- fatal: unable to access https:// Failed to connect to: Connection refused|git clone问题(完美解决)
fatal: unable to access 'https://github.com/xxxx/': Failed to connect to x.x.x.x port xxxxx: Connect ...
- 【解决】:centos7下使用git clone发生错误“fatal: unable to access ‘https://github.com/xxx.git/‘”
centos7配置git与错误解决 (一)centos7安装git (二)产生错误"fatal: unable to access" 解决方案 (一)centos7安装git 这里 ...
- jenkins 源码管理 returned status code 128: stdout: stderr: fatal: unable to access “****” 403 解决办法
在配置jenkins 源码管理 远程链接git时 提示 报错 Failed to connect to repository : Command"usr/bin/git ls-remote ...
- Git报错解决:fatal: unable to access ‘https://github.com/...‘: OpenSSL SSL_read:..., errno 10054
Git报错解决:fatal: unable to access 'https://github.com/-': OpenSSL SSL_read: Connection was reset, errn ...
- Git首次提交代码到远程仓库时,出现fatal: unable to access ‘https://github.com/xxx/xxx.git/‘
Git提交代码到远程仓库时报错 问题描述 fatal: unable to access 'https://github.com/sincere-zq/js-bridge.git/': error s ...
最新文章
- 南大算法设计与分析课程OJ答案代码(5)--割点与桥和任务调度问题
- 从*p++说指针,数组,结构和函数
- R语言配置可视化内容中的字体为斜体(italic)实战:标题斜体、轴标签斜体、文本内容斜体、或者部分内容斜体
- R语言setdiff函数集合作差运算实战
- mysql合并表中的数据
- Docker 容器 和 虚拟机 的异同
- STP生成树的选举详细步骤、四个案列详解(附图,建议电脑观看)
- python怎么写测试脚本语言_用python编写测试脚本
- Video 视频播放防作弊和禁止下载
- C++基础总结(4)-----指针
- 【优化求解】基于matlab遗传算法结合粒子群算法求解单目标优化问题【含Matlab源码 1659期】
- python index 报错_Python3 抓取数据报错IndexError: list index out of range
- Unity3d-简单AR游戏
- No matching provisioning profile found: Your build settings specify a provisioning profile with the
- 计算机新建表格2,(Word表格的制作计算机基础2.doc
- 【编译原理】LR语法分析器的设计与实现
- LabVIEW编程实例:如何通过TCP协议进行数据通信
- 入门PCB设计-DY工作室
- 弘辽科技:拼多多商品限制推广多久解封?怎么申诉?
- logcat命令使用方法和查看android系统日志缓冲区内容的方法