I have followed all the instructions on the documentation and I gitlab runner isn’t working for me.
I have installed the runner binary, created the user, added the user to the docker group, registered the runner and then try to run a stage
The command line I used was
gitlab-runner exec docker --docker-privileged build_container
the error I get is
$ docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password
ERROR: Job failed: exit code 1
FATAL: exit code 1
I suspect this is because CI_JOB_TOKEN is missing as is every other CI_XXXX environment variable.
I have echoed some of the variables in the CI yaml file and they are all blank.
the config.toml looks like this
concurrent = 1
check_interval = 0
name = “tim-laptop-runner”
url = “https://gitlab.com”
token = “redacted”
executor = “docker”
tls_verify = false
image = “docker:18-dind”
privileged = false
disable_cache = false
volumes = ["/cache"]
shm_size = 0