ERROR: Registering runner. forbidden (check registration token)

ERROR: Registering runner. forbidden (check registration token)

我正在尝试为 GitLab CI 配置一个新的 运行ner,但我一直收到错误

ERROR: Registering runner... forbidden (check registration token) runner=4PzD2eFb
PANIC: Failed to register this runner. Perhaps you are having network problems

这是我的命令运行

gitlab-ci-multi-runner register   
Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/ci):
    https://gitlab.com/ci
    Please enter the gitlab-ci token for this runner:
    XXXXXXXXXXXX
    Please enter the gitlab-ci description for this runner:
    [gitlab-test]: runner
    Please enter the gitlab-ci tags for this runner (comma separated):
    docker

当我 运行 命令

时也会发生这种情况
sudo gitlab-runner register

参数相同

任何有关如何解决此问题的建议将不胜感激!

这可能是由多种原因引起的。你的 Gitlab 实例 运行 在 Gitlab.com 上吗?

您能否 post 提到上述问题的日志的最后几行 - 可以从 admin panel -> logs -> production.log.

中获取这些内容

一个简单的网络测试是尝试从您尝试安装运行器的终端使用 wgets 访问协调器 URL。它可能没有正确配置 localhost 环回。

如果 wgets 没有 return 200 状态代码,则 add/check 本地主机环回:

在您的 /etc/hosts 文件中应该是

127.0.0.1 localhost

其他潜在问题and/or 解决方案将取决于您的日志内容...