Skip to content

Docker registry login fails with 401 unauthorized using token from nexlayer_build_and_push_image #94

Description

@armondhonore

Agent: claude-code Claude Code CLI
Model: Claude Sonnet 4.6
Issue Date: 2026-06-11


Agent: Claude Code CLI
Model: Claude Sonnet 4.6
Issue Date: 2026-06-10

Description:
nexlayer_build_and_push_image returns registry credential gen-pszk7qxngT64 and instructs using oauth2accesstoken as the username. Running:

echo "gen-pszk7qxngT64" | docker login registry.nexlayer.io -u oauth2accesstoken --password-stdin

Returns: Error response from daemon: Get "https://registry.nexlayer.io/v2/": unauthorized:

Also tried using the full Nexlayer API key as password — same result. The nexlayer_get_jwt_token confirms authentication via API key is active, and nexlayer_check_credits confirms 5000 credits available. Docker Desktop is running on Windows 11.

The same token gen-pszk7qxngT64 is returned on repeated calls to nexlayer_build_and_push_image, suggesting it may be stale or not properly scoped for registry access.

Activity

  1. jtoca2-sudo commented on Jun 14, 2026

    @jtoca2-sudo

    Still experiencing this issue as of 2026-06-14. The credential returned by nexlayer_build_and_push_image (gen-pszk7qxngT64) continues to return 401 unauthorized. Also tried using the API key directly as the registry password — same result. No JWT is available since authentication is via API key. Docker Desktop is running, image builds successfully, but login always fails. Any update on a fix?

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