错误:注册跑步者。 禁止(检查注册标记)

我正在尝试为GitLab CIconfiguration一个新的运行器,并且不断收到错误信息

错误:注册runner … forbidden(检查注册令牌)runner = 4PzD2eFb
PANIC:注册失败 也许你有networking问题

这是我运行的命令

gitlab-ci-multi-runner register Please enter the gitlab-ci coordinator URL (eg 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上运行?

你可以发布日志的最后几行提到上述问题 – 可以从admin panel -> logs -> production.log获取这些。

一个简单的networkingtesting将尝试使用您尝试安装跑步者的terminal上的wgets来击中协调器URL。 它可能没有正确configuration本地主机回送。

如果wgets没有返回200状态码,那么添加/检查localhost loopback:

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

127.0.0.1 localhost

其他潜在的问题和/或解决scheme将取决于你的日志说什么…