Skip to content

Intermittent failures on logging in with Google Artifact Registry #885

Closed

Description

@yairhay-di

Contributing guidelines

I've found a bug, and:

  • The documentation does not mention anything about my problem
  • There are no open or closed issues that are related to my problem

Description

When running the login action
# - name: Login to GAR # id: docker_gar # uses: docker/login-action@v3
We intermittently experiencing the following error:
Error: Error response from daemon: Get "https://${region}-docker.pkg.dev/v2/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

Most of the time it works, but sometimes it fails.

Expected behaviour

To login successfuly

Actual behaviour

Error: Error response from daemon: Get "https://${region}-docker.pkg.dev/v2/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

Repository URL

No response

Workflow run URL

No response

YAML workflow

`    # - name: Login to GAR
    #   id: docker_gar
    #   uses: docker/login-action@v3`

Workflow logs

No response

BuildKit logs


Additional info

No response

Activity

  1. joaodiogocosta commented on Aug 13, 2025

    @joaodiogocosta

    Same here

  2. austinpray-mixpanel commented on Aug 13, 2025

    @austinpray-mixpanel

    with

    Run docker/login-action@v3
      with:
        registry: us.gcr.io
        username: oauth2accesstoken
        password: ***
        ecr: auto
        logout: true
    

    getting

    Error: Error response from daemon: Get "https://us.gcr.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
    
  3. crazy-max commented on Sep 29, 2025

    @crazy-max
    Member

    Do you still repro? Might be smth flaky with Google Artifact Registry

  4. jsmith212 commented on Dec 15, 2025

    @jsmith212

    Same here, but for a self hosted registry. I haven't had any issues elsewhere with that registry, and rerunning a few times usually fixes it. Would it be possible to just add a retry count?

  5. moicalcob commented on Jan 28, 2026

    @moicalcob

    We're seeing a similar behaviour every now and then and it's happening more frequently lately:

      with:
        registry: gcr.io
        username: _json_key
        password: ***
      
        logout: true
    Logging into gcr.io...
    Error: Error response from daemon: login attempt to https://gcr.io/v2/ failed with status: 401 Unauthorized
    
  6. matthiasPOE commented on Feb 13, 2026

    @matthiasPOE

    Our actions are completely down due to unable to pull:

    Unable to find image 'docker.pkg.github.com/**/**/**:head' locally
    docker: Error response from daemon: unknown: failed to resolve reference "docker.pkg.github.com/**/**/**:head": unexpected status from HEAD request to https://docker.pkg.github.com/v2/**/**/**/manifests/head: 401 Unauthorized
    
    

    The login works fine before it?

    Run docker/login-action@v3
    Logging into docker.pkg.github.com...
    Login Succeeded!
    

    Anyone else experiencing the same issue?

  7. crazy-max commented on Feb 13, 2026

    @crazy-max
    Member

    Our actions are completely down due to unable to pull:

    Unable to find image 'docker.pkg.github.com/**/**/**:head' locally
    docker: Error response from daemon: unknown: failed to resolve reference "docker.pkg.github.com/**/**/**:head": unexpected status from HEAD request to https://docker.pkg.github.com/v2/**/**/**/manifests/head: 401 Unauthorized
    

    The login works fine before it?

    Run docker/login-action@v3
    Logging into docker.pkg.github.com...
    Login Succeeded!
    

    Anyone else experiencing the same issue?

    That's unrelated with this issue that is about GAR. Also docker.pkg.github.com is EOL, switch to ghcr.io: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-docker-registry

  8. esavier commented on Feb 26, 2026

    @esavier

    is this really triage since Aug 2025...?

  9. esavier commented on Feb 26, 2026

    @esavier

    here, a PR.
    generally network issue. Error is forwarded from docker and is misleading.

  10. SirBrenton commented on Feb 26, 2026

    @SirBrenton

    This smells like transient network / registry edge flake rather than a deterministic auth/config bug.

    Two concrete guardrails that usually collapse this class fast:

    1. Retry transient failures only (timeout / connection reset / EOF), with a hard cap + jittered backoff.

      • e.g. 3 attempts, 2s → 4s → 8s (+ jitter)
      • Never retry 401/403 (those are terminal: creds/permissions).
    2. Emit a tiny “receipt” per attempt so we can separate:

      • DNS vs TCP connect vs TLS handshake vs “awaiting headers”
      • runner context (hosted vs self-hosted, region if known)
      • latency_ms + error_class

    If maintainers are open to it, docker/login-action could accept something like retry_max + retry_backoff_ms (or implement internally around the docker login call), but only for known transient error classes.

    Happy to help draft the minimal classification list + defaults.

    ———

    If you can share 5–20 redacted failure receipts (timestamps + error string + latency), I can turn it into a ranked hazard signature.

  11. crazy-max commented on Apr 2, 2026

    @crazy-max
    Member

    Closing in favor of #750.

    This looks like the same underlying class of workflow reliability problem, and I'd rather keep the retry discussion tracked in one place instead of splitting it across multiple issues.

    The current direction is that action-specific retry logic in login-action is not the right abstraction, so I'm consolidating this under the broader discussion in #750.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions