You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Track workflow-level retry support for transient registry login failures #750
Hey! Occasionally, our login step fails due to rate-limiting or the system we're logging into being unavailable. It would be super useful to have a retry flag of some kind. Based on similar functionality for other actions in the space, imagining it might look like:
Reacted by Rob Dimsdale-Zucker, Ashwin Khode, Ivan Martinez, Roger Llecha, Daniel Wolf, Lena Schönburg, Jonas Scholz, Richard Strand, Jonathan Hollander, blockjesper and 53 more
This would be fantastic. I have actions occasionally fail with Client.Timeout exceeded while awaiting headers and just rerunning the step does the trick in those instances.
Reacted by Jonas Scholz, yiftachkarkason and MatthiasKochMkoch
Hammering a registry of requests because it's unavailable is not a short or long term solution. Registries often implement rate limiting to prevent abuse and ensure fair usage among all users. If a login attempt fails due to rate limiting, retrying the login multiple times in quick succession can exacerbate the problem. This can lead to further rate limiting, potentially locking out the user for a longer period or affecting other users who are trying to access the registry. If the registry is temporarily unavailable due to maintenance or an outage, retrying the login multiple times will not resolve the issue. This can result in unnecessary load on the registry once it becomes available again, as multiple clients may attempt to reconnect simultaneously.
While retry logic can be useful, it's important to implement it thoughtfully to avoid exacerbating issues like rate limiting and system unavailability. Using smth like exponential backoff, circuit breaker patterns could be a solution.
Reacted by Jose Enrique Marquez and Moisés Calzado
I would consider to add more status code for the retries as an optional property in the action.
There are situations where a 401 is returned from a custom registry as a security mechanism to avoid giving hints and you may want to retry those as well (of course with a backoff retry policy in place...). Maybe not the default but overridable would be great
hey @crazy-max , beside of that topic being hot, I also understand that I am not the best actions developer in the world, and my PR may be not in the direction you'd like it to be.
Being your sponsor here on GitHub for a past few months, and on that sponsorship level may I use your statement:
You're very supportive 🙌 Is there a project you want me to focus on?
and can you give some hint on what to improve on my approach to be accepted?
I don't think action-specific retry logic is the right direction for login-action.
This is not really a login feature, it's a generic workflow reliability problem. The same class of transient failures shows up across login, bootstrap, pulls, cache operations, auth, and pushes, depending on the runner, registry, and network path involved. Adding retry logic independently in each action means each action has to guess which errors are safe to retry across different registries and failure modes, which gets brittle quickly.
It's also the wrong abstraction layer. This kind of behavior belongs in GitHub runner or workflow primitives, for example first-class retry support for uses: steps, rather than each action inventing its own retry semantics. That would be reusable across actions, more consistent for users, and more future proof.
For auth failures specifically, action-local retries are not obviously correct. A 401, timeout, or rate limit can imply very different causes, and retrying inside the action can hide real configuration problems or add more pressure to the registry.
So I'd rather keep this tracked here as part of the broader retry discussion than add retry or backoff logic directly to this action.
The runner example is useful, but I don't think it changes the conclusion for docker/login-action.
That retry happens while GitHub Actions is preparing a job or service container. In that path the runner owns the whole lifecycle: it creates the temporary Docker config, logs in if needed, pulls the image, starts the container, and cleans up. Retrying there is scoped to runner-managed container startup.
docker/login-action is a normal workflow step, and adding retry knobs here would still leave the same class of failures spread across setup, bootstrap, pulls, cache operations, pushes, manifest creation, and other registry operations. Each action would still need to define its own retry policy and decide which failures are safe to retry across Docker Hub, GHCR, GAR, ECR, Harbor, Quay, and custom registries.
For GHCR specifically, the runner behavior also looks like GitHub handling flakiness or special auth behavior in their own container startup path. That doesn't mean login-action should reproduce the same policy for every registry.
The part I disagree with is that there is no drawback. Docker CLI exit codes are too coarse to reliably distinguish transient registry problems from bad credentials, permission problems, token propagation delays, rate limiting, or registry-specific auth behavior. Retrying can hide real configuration errors, waste runner time, and make rate limiting worse.
So I still don't think adding action-specific retry/backoff logic to login-action is the right direction.
By adding this feature inside the action, we could have a retries for the first class of issue, but not for the second. Otherwise, users will need to implement the retry mechanism themselves, and very probably, they will do it regardless the issue, and it'll exacerbate the use case 2..
Reacted by Alexey Kuznetsov, Maximo Bautista, Raz Ben Simon, Christian Nicolai and Patrick Pötz
Activity
ashwinkhode commentedon Jul 18, 2024
+1
nephatrine commentedon Aug 20, 2024
This would be fantastic. I have actions occasionally fail with Client.Timeout exceeded while awaiting headers and just rerunning the step does the trick in those instances.
szofar commentedon Sep 11, 2024
same! our Harbor registry times out ALL the time and I have to go manually re-trigger the workflow
crazy-max commentedon Oct 4, 2024
Hammering a registry of requests because it's unavailable is not a short or long term solution. Registries often implement rate limiting to prevent abuse and ensure fair usage among all users. If a login attempt fails due to rate limiting, retrying the login multiple times in quick succession can exacerbate the problem. This can lead to further rate limiting, potentially locking out the user for a longer period or affecting other users who are trying to access the registry. If the registry is temporarily unavailable due to maintenance or an outage, retrying the login multiple times will not resolve the issue. This can result in unnecessary load on the registry once it becomes available again, as multiple clients may attempt to reconnect simultaneously.
While retry logic can be useful, it's important to implement it thoughtfully to avoid exacerbating issues like rate limiting and system unavailability. Using smth like exponential backoff, circuit breaker patterns could be a solution.
ealogar commentedon Oct 31, 2024
I would consider to add more status code for the retries as an optional property in the action.
There are situations where a 401 is returned from a custom registry as a security mechanism to avoid giving hints and you may want to retry those as well (of course with a backoff retry policy in place...). Maybe not the default but overridable would be great
fedordikarev commentedon Jan 24, 2025
hi!
here is my second approach to that issue with more dedicated time rather than 30 minutes in the train I had for the first attempt :)
@crazy-max can you take a look #849 and let me know what you think about that approach?
mikebowyer commentedon Apr 17, 2025
@crazy-max, this would be very beneficial to have. Is there anything we can help do to the PR from @fedordikarev merged?
sgutwein commentedon Sep 11, 2025
Please add the retry! It's so annoying when you having a con job, triggered at night, failing because of this!
2ooLe commentedon Sep 17, 2025
@crazy-max Could we get some eyes on: #849 please?
sebwalle commentedon Dec 1, 2025
we need this too. Please fix
fedordikarev commentedon Dec 2, 2025
hey @crazy-max , beside of that topic being hot, I also understand that I am not the best actions developer in the world, and my PR may be not in the direction you'd like it to be.
Being your sponsor here on GitHub for a past few months, and on that sponsorship level may I use your statement:
and can you give some hint on what to improve on my approach to be accepted?
crazy-max commentedon Apr 2, 2026
This looks like the same class of problem as the retry requests already discussed across sibling actions, for example:
I don't think action-specific retry logic is the right direction for
login-action.This is not really a login feature, it's a generic workflow reliability problem. The same class of transient failures shows up across login, bootstrap, pulls, cache operations, auth, and pushes, depending on the runner, registry, and network path involved. Adding retry logic independently in each action means each action has to guess which errors are safe to retry across different registries and failure modes, which gets brittle quickly.
It's also the wrong abstraction layer. This kind of behavior belongs in GitHub runner or workflow primitives, for example first-class retry support for
uses:steps, rather than each action inventing its own retry semantics. That would be reusable across actions, more consistent for users, and more future proof.For auth failures specifically, action-local retries are not obviously correct. A 401, timeout, or rate limit can imply very different causes, and retrying inside the action can hide real configuration problems or add more pressure to the registry.
So I'd rather keep this tracked here as part of the broader retry discussion than add retry or backoff logic directly to this action.
[-]Add retry[/-][+]Track workflow-level retry support for transient registry login failures[/+]ci: retry ghcr.io docker login on transient failures
jprecuch commentedon May 13, 2026
We also can see that first "internal job" of GitHub does retries when starting containers and it resolves the flakiness there long-term
It seems we would need to switch back to similar printf way if this action does not like the retry mechanism implemented
it could be set to no retry by default and allow people to decide if they want retries enabled or no.. I don't see any drawback there.
crazy-max commentedon May 22, 2026
@jprecuch Thanks for the extra context.
The runner example is useful, but I don't think it changes the conclusion for
docker/login-action.That retry happens while GitHub Actions is preparing a job or service container. In that path the runner owns the whole lifecycle: it creates the temporary Docker config, logs in if needed, pulls the image, starts the container, and cleans up. Retrying there is scoped to runner-managed container startup.
docker/login-actionis a normal workflow step, and adding retry knobs here would still leave the same class of failures spread across setup, bootstrap, pulls, cache operations, pushes, manifest creation, and other registry operations. Each action would still need to define its own retry policy and decide which failures are safe to retry across Docker Hub, GHCR, GAR, ECR, Harbor, Quay, and custom registries.For GHCR specifically, the runner behavior also looks like GitHub handling flakiness or special auth behavior in their own container startup path. That doesn't mean
login-actionshould reproduce the same policy for every registry.The part I disagree with is that there is no drawback. Docker CLI exit codes are too coarse to reliably distinguish transient registry problems from bad credentials, permission problems, token propagation delays, rate limiting, or registry-specific auth behavior. Retrying can hide real configuration errors, waste runner time, and make rate limiting worse.
So I still don't think adding action-specific retry/backoff logic to
login-actionis the right direction.cbeauchesne commentedon Jun 5, 2026
Upvote this issue. Many errors are coming from :
By adding this feature inside the action, we could have a retries for the first class of issue, but not for the second. Otherwise, users will need to implement the retry mechanism themselves, and very probably, they will do it regardless the issue, and it'll exacerbate the use case
2..