Skip to content

fix: add --headless to prevent browser opening on auth failure in CI#49

Closed
k4leung4 wants to merge 1 commit into
chainguard-dev:mainfrom
k4leung4:headless
Closed

fix: add --headless to prevent browser opening on auth failure in CI#49
k4leung4 wants to merge 1 commit into
chainguard-dev:mainfrom
k4leung4:headless

Conversation

@k4leung4
Copy link
Copy Markdown
Contributor

Summary

Add --headless flag to chainctl auth login and
chainctl auth configure-docker commands in the action. This prevents
chainctl from attempting to open a browser window when authentication
fails in CI, which hangs the workflow indefinitely.

Problem

When setup-chainctl fails (e.g., identity name passed instead of UIDP,
misconfigured identity, missing id-token: write permission), chainctl
falls back to browser-based authentication. In GitHub Actions, there is
no browser, so the workflow hangs until it times out.

Fix

--headless ensures chainctl uses the device flow fallback instead of
browser-based auth. This only affects the failure path — when --identity
succeeds via ambient credentials (the normal CI path), --headless is
never exercised.

Risk

None. The --headless flag only changes behavior when ambient credential
detection fails, which is already a failure case. Normal --identity
authentication via GitHub Actions OIDC is unaffected.

🤖 Generated with Claude Code

Signed-off-by: Kenny Leung <kleung@chainguard.dev>
@k4leung4 k4leung4 requested review from cmdpdx and cpanato March 16, 2026 21:12
@k4leung4 k4leung4 marked this pull request as draft March 16, 2026 22:34
@k4leung4 k4leung4 removed request for cmdpdx and cpanato March 16, 2026 22:34
@k4leung4 k4leung4 closed this Mar 17, 2026
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