本地搭建GitLab地址不一致问题
1.本地虚拟机用docker搭建Gitlabproject clone 地址如下:实际地址如下:http://192.168.56.51/root/apacha_backend本来没在意这个问题,clone代码都没什么影响,但是用Gitlab Runner做CICD的时候报错如下:fatal: unable to access 'http://gitlab-ci-token:xxxxxxxxxxx
·
1.本地虚拟机用docker搭建Gitlab
project clone 地址如下:
实际地址如下:
http://192.168.56.51/root/apacha_backend
本来没在意这个问题,clone代码都没什么影响,
但是用Gitlab Runner做CICD的时候报错如下:
fatal: unable to access 'http://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@10.222.56.51/root/apacha_backend.git/': Failed to connect to 10.222.56.51 port 80: Operation timed out
/bin/bash: line 81: cd: /root/apacha_backend: No such file or directory
00:00
ERROR: Job failed: command terminated with exit code 1
原因及方案:
/opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml
内host配置不正确,修改后重启即可解决问题
production: &base
#
# 1. GitLab app settings
# ==========================
## GitLab settings
gitlab:
## Web server settings (note: host is the FQDN, do not include http://)
host: 192.168.56.51
gitlab-ctl restart
更多推荐
已为社区贡献2条内容
所有评论(0)