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.

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