Gitlab-runner error connecting to Dockerregistry with GitLab's Ruby on Rails Template

I setup a VM on AWS to serve as a GitLab Runner to handle things like Page Builds and CI. While GitLab Pages seems to be working, it’s unable to run the Auto DevOps CI for me.

Configuration:

Log Output from Job:

Running with gitlab-runner 11.8.0 (4745a6f3)
  on aws 78sA7DuB
Using Docker executor with image docker:stable-git ...
Starting service docker:stable-dind ...
Pulling docker image docker:stable-dind ...
Using docker image sha256:85e924caedbd3e5245ad95cc7471168e923391b22dcb559decebe4a378a06939 for docker:stable-dind ...
Waiting for services to be up and running...

*** WARNING: Service runner-78sA7DuB-project-35-concurrent-0-docker-0 probably didn't start properly.

Health check error:
service "runner-78sA7DuB-project-35-concurrent-0-docker-0-wait-for-service" timeout

Health check container logs:


Service container logs:
2019-03-15T02:36:04.340279836Z mount: permission denied (are you root?)
2019-03-15T02:36:04.340328618Z Could not mount /sys/kernel/security.
2019-03-15T02:36:04.340333705Z AppArmor detection and --privileged mode might break.
2019-03-15T02:36:04.340337314Z mount: permission denied (are you root?)

*********

Pulling docker image docker:stable-git ...
Using docker image sha256:c1929c2091c498b6fd8166aac00f32663f28e81de3bd57725dec3ef9ebe65100 for docker:stable-git ...
Running on runner-78sA7DuB-project-35-concurrent-0 via 1bad71fc897d...
Fetching changes...
HEAD is now at 816a358 Rails template
Checking out 816a358c as master...
Skipping Git submodules setup
$ # Auto DevOps variables and functions # collapsed multi-line command
$ setup_docker
$ build
Logging to GitLab Container Registry with CI credentials...
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password
ERROR: Job failed: exit code 1

From email:

Checking out 816a358c as master...
Skipping Git submodules setup
section_end:1552617397:get_sources
section_start:1552617397:restore_cache
section_end:1552617399:restore_cache
section_start:1552617399:download_artifacts
section_end:1552617400:download_artifacts
section_start:1552617400:build_script
$ # Auto DevOps variables and functions # collapsed multi-line command
$ setup_docker
$ build
Logging to GitLab Container Registry with CI credentials...
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Get https://registry-1.docker.io/v2: unauthorized: incorrect username or password
section_end:1552617402:build_script
section_start:1552617402:after_script
section_end:1552617403:after_script
section_start:1552617403:upload_artifacts_on_failure
section_end:1552617404:upload_artifacts_on_failure
ERROR: Job failed: exit code 1

Have you tried creating a new personal access token and using that? That typically fixes my issues when I get Get https://registry-1.docker.io/v2: unauthorized: incorrect username or password

1 Like

I want to confirm/clarify a few things.

  1. That’s it’s correct to login to the runner (not GitLab Instance) as root and run docker login and provide my username and password.
  2. It’s my username and password for Docker Hub (https://hub.docker.com/?ref=login)
  3. I cannot find the webpage to create a person access token. Can you link me?
  4. Just to clarify, I’m using whatever docker images are public, I haven’t created my own images (am I supposed to?).

Thanks,
Nathaniel