1

Recently I have transfered a private project to a group in Gitlab. The problem is that the gitlab-runner fails at pulling an image from gitlab.registry.com. Does anybody know why it's complaining now?. No changes were made to the file .gitlab-ci.yml, the only difference is that the project was moved to a group via transfer functionality in Gitlab.com.

Here is .gitlab-ci.yml

stages:
    - version

version:
    stage: version
    image: registry.gitlab.com/mbuchleitner/go-semrel-gitlab:v0.21.1
    script:
        - git fetch --tags
        - release next-version --bump-patch > .next-version
    artifacts:
        paths:
        - .next-version
    only:
        - master

Here is the failed job:

Running with gitlab-runner 13.6.0 (8fa89735)
  on docker-auto-scale 0277ea0f
Preparing the "docker+machine" executor
00:12
Using Docker executor with image registry.gitlab.com/mbuchleitner/go-semrel-gitlab:v0.21.1 ...
Authenticating with credentials from job payload (GitLab Registry)
Pulling docker image registry.gitlab.com/mbuchleitner/go-semrel-gitlab:v0.21.1 ...
ERROR: Job failed: Error response from daemon: pull access denied for registry.gitlab.com/mbuchleitner/go-semrel-gitlab, repository does not exist or may require 'docker login' (docker.go:142:0s)

Here is the previous OK job:

Running with gitlab-runner 13.6.0 (8fa89735)
  on docker-auto-scale 0277ea0f
Preparing the "docker+machine" executor
00:13
Using Docker executor with image registry.gitlab.com/mbuchleitner/go-semrel-gitlab:v0.21.1 ...
Authenticating with credentials from job payload (GitLab Registry)
Pulling docker image registry.gitlab.com/mbuchleitner/go-semrel-gitlab:v0.21.1 ...
Using docker image sha256:7c4df241bfce32bb7289a3b4c070a717789989773e6c559a8961ea58d3bc54b0 for registry.gitlab.com/mbuchleitner/go-semrel-gitlab:v0.21.1 with digest registry.gitlab.com/mbuchleitner/go-semrel-gitlab@sha256:5d0cd7209456b7bd3a5467d21de3c78b78d763d8ae90612299cd8bb2495d0542 ...
Preparing environment
00:02
Running on runner-0277ea0f-project-8575915-concurrent-0 via runner-0277ea0f-srm-1606329676-ea714745...
Getting source from Git repository
00:03
$ eval "$CI_PRE_CLONE_SCRIPT"
Fetching changes...
Initialized empty Git repository in /builds/carlosrivas/club/.git/
Created fresh repository.
Checking out 896a4cc3 as master...
Skipping Git submodules setup
Executing "step_script" stage of the job script
00:02
$ git fetch --tags
$ release next-version --bump-patch > .next-version
Uploading artifacts for successful job
00:01
Uploading artifacts...
.next-version: found 1 matching files and directories 
Uploading artifacts as "archive" to coordinator... ok  id=872692037 responseStatus=201 Created token=4bdJi9Hg
Cleaning up file based variables
00:01
Job succeeded
Adri
  • 11
  • 1
  • 2

1 Answers1

2

Our setup started failing similarly with seemingly no change at all, unlike your case where you moved the registry. We are using local gitlab-runners with docker executors on the same machine that hosts the registry. Docker pull started failing, despite valid authentication to the container registry; tried .docker/config.json on the gitlab-runner user, DOCKER_AUTH_CONFIG in the project's web UI settings and DOCKER_AUTH_CONFIG in .gitlab-ci.yml, none of which worked. In the end I had to modify the runner's pull_policy to if-not-present so that the image can be found in the local cache.

Ayberk Özgür
  • 4,986
  • 4
  • 38
  • 58
  • In my case the problem was that the image registry.gitlab.com/mbuchleitner/go-semrel-gitlab:v0.21.1 is no public anymore. Changing to registry.gitlab.com/juhani/go-semrel-gitlab:v0.21.1 works again – Adri Jan 08 '21 at 23:43
  • I am experiencing the same issue. Pulls randomly fails, but specific repositories are much more likely to fail. "Similar" repositories even seems to fail at a similar ratio. – user239558 Feb 19 '23 at 09:16