准备在内网搭建基于gitlab,gitbook的环境。然而坑不少。
软件版本:
gitlab :8.13.5
PostgreSQL:9.2.18
在网上找了清华的gitlab镜像站,分别下载gitlab-runner gitlab-ci-multi-runner.
安装完之后,准备配置CI,系统报错405
[root@tianji09 yum.repos.d]# gitlab-ci-multi-runner --debug register
Runtime platform arch=amd64 os=linux revision=b5e03c94 version=10.7.2
Checking runtime mode GOOS=linux uid=0
Running in system-mode.
Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/):
http://172.16.15.19/ci
Please enter the gitlab-ci token for this runner:
yeCVVAL8TAhQgjx-xLsz
Please enter the gitlab-ci description for this runner:
[tianji09]: gitbook
Please enter the gitlab-ci tags for this runner (comma separated):
v1.1
Whether to run untagged builds [true/false]:
[false]: true
Whether to lock the Runner to current project [true/false]:
[true]: false
Dialing: tcp 172.16.15.19:80 ...
ERROR: Registering runner... failed runner=yeCVVAL8 status=405 Method Not Allowed
PANIC: Failed to register this runner. Perhaps you are having network problems
网上说可能是版本不兼容,于是想升级gitlab-ce到最新的10.7.3
但是安装时报错,提示9.5之后PostgreSQL后续版本不支持直接升级,需要先升级PostgreSQL,然后才能安装最新gitlab-ce
很郁闷准备找PostgreSQL升级包,网上步骤显示也挺复杂的。
准备试试降级gitlab-runner
同样在清华镜像站下载gitlab-ci-multi-runner=1.11.1
问题解决。
参考URL:https://stackoverflow.com/questions/37509848/gitlab-ci-failed-to-register-runner/50443626#50443626