Skip to content

Docker credential helper: route all helper output to stdout#2061

Merged
matt-richardson merged 1 commit into
mainfrom
fix/docker-cred-helper-all-output-stdout
Jul 7, 2026
Merged

Docker credential helper: route all helper output to stdout#2061
matt-richardson merged 1 commit into
mainfrom
fix/docker-cred-helper-all-output-stdout

Conversation

@matt-richardson

@matt-richardson matt-richardson commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #2059 (which moved the "credentials not found" error to stdout)

The docker credential-helper protocol example code (docker-credential-helpers Serve) only emits to stdout, not stderr.

Our docker-credential-octopus wrote some messages to stderr, where docker's cmd.Output() discards them and the client surfaces it as:

error getting credentials - err: exit status 1, out: \``.

Relates to OctopusDeploy/Issues#10128.

Results

This PR changes the rest to stdout.

Align the whole helper with the docker credential-helper protocol
(docker-credential-helpers `Serve`): clients read only the helper's stdout,
so every message - not just the not-found sentinel (#2059) - belongs there.
Moves the remaining diagnostics (invalid operation/store request, missing
server URL, missing OCTOPUS_CREDENTIAL_PASSWORD/DOCKER_CONFIG, and the
catch-all) off stderr, where docker's cmd.Output() discarded them and the
client reported an unhelpful `out: ``. Drops the now-vestigial error
TextWriter from the protocol, matching Serve's single output stream.

Non-behavioural for the already-fixed not-found path; this improves failure
diagnosability in the deployment log.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@matt-richardson matt-richardson merged commit 1eb487e into main Jul 7, 2026
35 checks passed
@matt-richardson matt-richardson deleted the fix/docker-cred-helper-all-output-stdout branch July 7, 2026 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants