mirror of
https://github.com/moby/buildkit.git
synced 2026-11-06 05:16:45 +00:00
Credential helpers can return tokens that expire before the auth cache TTL. Force one credential reload when an authenticated token exchange ends in 401, after the existing POST-to-GET fallback. Retry only when the effective credentials change, without altering the normal cache expiration policy. Inspect the HTTP status before formatting registry errors so structured unauthorized responses can trigger recovery. Preserve the final error format and stop if the replacement credentials are also rejected. Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>