Docker login on multiple jobs failing
Summary
On our self-hosted fleet of runners, we found that if we docker login
on the same host in two different jobs, one of them receives a "403 Forbidden" from the GitLab instance whilst doing docker push
.
Steps to reproduce
Multiple jobs doing docker login
and docker push
on the same host. Probably the timeline is the following:
- Job A:
docker login
with token A - Job B:
docker login
with token B - Job B:
docker push
- Job A:
docker push
fails
Actual behavior
GitLab instance replies with 403 Forbidden.
Expected behavior
Successful build since the token is correct (we use GITLAB_CI_TOKEN
environment variable for docker login
).
Environment description
Self-hosted GitLab and runners. 9.2.2-ce.0
Used GitLab Runner version
9.2.0
Edited by username-removed-686096