Cannot register runner with runner token (new workflow)

Replace this template with your information

Describe your question in as much detail as possible:

  • What are you seeing, and how does that differ from what you expect to see?
    I keep getting this error when trying to register a gitlab runner using the new method (so not using a register token anymore), but a glrt- token, so a runner token:

Runner configuration other than name and executor configuration is reserved (specifically --locked, --acces s-level, --run-untagged, --maximum-timeout, --paused, --tag-list, and --maintenance-note) and cannot be specified when registering with a runner authentication token. This configuration is specified on the GitLab server. Please try again without specifying any of those arguments.

I’m trying to register the runner like this:

/usr/bin/gitlab-runner register --url "" --token ${GITLAB_CI_TOKEN}

This is exactly what the instructions are when I create the runner from the GUI and I’ve no idea

  • What version are you on? Are you using self-managed or

    • GitLab (Hint: /help): 16.3.4
    • Runner (Hint: /admin/runners): 16.5.0
  • Add the CI configuration from .gitlab-ci.yml and other configuration if relevant (e.g. docker-compose.yml)
    This is the relevant part of the script that runs as an entrypoint. I’m not using the official helm chart, this is custom. With the deprecated registration workflow (register token) this works without any issues:

data: |
    unregister() {
        kill %1
        echo "Unregistering runner ${RUNNER_NAME} ..."
        /usr/bin/gitlab-ci-multi-runner unregister -t "$(/usr/bin/gitlab-ci-multi-runner list 2>&1 | tail -n1 | awk '{print $4}' | cut -d'=' -f2)" -n ${RUNNER_NAME}
        exit $?
    trap 'unregister' EXIT HUP INT QUIT PIPE TERM
    echo "Registering runner ${RUNNER_NAME} ..."
    export ORDER=${HOSTNAME##*-}
    export TAG=vm$((ORDER+1))
    /usr/bin/gitlab-runner register --url "" --token ${GITLAB_CI_TOKEN}

I think that’s the only link relevant to this issue. Until now I tried to figure out the older registration process and then I’ve come across the newer one, which is rather difficult to understand.

The problem seems to be related to the fact that I was adding the enviromental variable:


Commenting this out fixed the issue.