Unable to login in private image repository
Summary
Unable to login in private image repository
Steps to reproduce
- Setup a private repository.
- configure DOCKER_AUTH_CONFIG
- try to deploy an image with gitlab-ci.yml from the private repository
The same happens when:
- Setup a private repository.
- do "docker login private.repository.com:5000/path" as "root" and as "gitlab-runner" users on the runner host
- try to deploy an image with gitlab-ci.yml from the private repository
The private repository we are using is VMWare Harbor.
Example Project
What is the current bug behavior?
ERROR: Job failed: Error response from daemon: pull access denied for private.repository.com:5000/path/some-image, repository does not exist or may require 'docker login' (executor_docker.go:168:0s)
What is the expected correct behavior?
To have the image pulled. Using docker login private.repository.com:5000
on the runner host (and any other host) works as expected and Im able to pull the image.
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: CentOS 7.5.1804 Proxy: no Current User: git Using RVM: no Ruby Version: 2.4.4p296 Gem Version: 2.7.6 Bundler Version:1.16.2 Rake Version: 12.3.1 Redis Version: 3.2.11 Git Version: 2.18.0 Sidekiq Version:5.1.3 Go Version: unknownGitLab information Version: 11.2.3-ee Revision: aadca99 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.8 URL: http://gitlab.our-domain.com:4500 HTTP Clone URL: http://gitlab.our-domain.com:4500/some-group/some-project.git SSH Clone URL: git@gitlab.our-domain.com:some-group/some-project.git Elasticsearch: yes Geo: no Using LDAP: no Using Omniauth: no
GitLab Shell Version: 8.1.1 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks
Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab Shell ...GitLab Shell version >= 8.1.1 ? ... OK (8.1.1) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 4/1 ... repository is empty 1/3 ... repository is empty 1/4 ... ok 1/5 ... ok 1/6 ... ok 1/7 ... ok 19/8 ... ok 14/9 ... ok 1/10 ... ok 19/12 ... ok 1/13 ... ok 8/14 ... ok 1/15 ... ok 7/16 ... ok 19/18 ... ok 14/19 ... ok 13/20 ... ok 1/21 ... repository is empty 1/22 ... ok 1/23 ... ok 1/24 ... ok 30/25 ... ok 1/26 ... ok 5/27 ... ok 14/28 ... ok 14/29 ... ok 22/30 ... ok 20/31 ... repository is empty 12/32 ... ok 1/33 ... repository is empty 24/34 ... ok 23/35 ... ok 1/36 ... repository is empty 20/37 ... ok 8/38 ... ok 1/39 ... ok 1/41 ... ok 1/42 ... ok 11/44 ... repository is empty 1/45 ... ok 1/46 ... ok 1/47 ... ok 1/48 ... repository is empty Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
IMAP server credentials are correct? ... yes Init.d configured correctly? ... skipped MailRoom running? ... skipped
Checking Reply by email ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 4/1 ... yes 1/3 ... yes 1/4 ... yes 1/5 ... yes 1/6 ... yes 1/7 ... yes 19/8 ... yes 14/9 ... yes 1/10 ... yes 19/12 ... yes 1/13 ... yes 8/14 ... yes 1/15 ... yes 7/16 ... yes 19/18 ... yes 14/19 ... yes 13/20 ... yes 1/21 ... yes 1/22 ... yes 1/23 ... yes 1/24 ... yes 30/25 ... yes 1/26 ... yes 5/27 ... yes 14/28 ... yes 14/29 ... yes 22/30 ... yes 20/31 ... yes 12/32 ... yes 1/33 ... yes 24/34 ... yes 23/35 ... yes 1/36 ... yes 20/37 ... yes 8/38 ... yes 1/39 ... yes 1/41 ... yes 1/42 ... yes 11/44 ... yes 1/45 ... yes 1/46 ... yes 1/47 ... yes 1/48 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.4.4) Git version >= 2.9.5 ? ... yes (2.18.0) Git user has default SSH configuration? ... yes Active users: ... 38 Elasticsearch version 5.1 - 5.5? ... yes (5.5.3)
Checking GitLab ... Finished
Possible fixes
I havent found any workaround to the above so far.