Skip to content

Publish with a key instead of a password - #15

Merged
nicodes merged 1 commit into
mainfrom
publish-from-ci
Aug 3, 2026
Merged

Publish with a key instead of a password#15
nicodes merged 1 commit into
mainfrom
publish-from-ci

Conversation

@nicodes

@nicodes nicodes commented Aug 3, 2026

Copy link
Copy Markdown
Member

Client half of publish keys. Pairs with aviorstudio/termcade-be#11.

$ termcade keys new release-workflow aviorstudio
created "release-workflow", publishing as aviorstudio

  tck__7WVTx94h5mopsk7F6kpcUifGrZTOGPay4LCof3L4KA

that token is shown once and cannot be recovered — put it somewhere safe now

Then, on a machine nobody is logged in to:

TERMCADE_TOKEN=tck_… termcade publish <repo> <tag> <asset>

Three details

The environment wins over a stored session. A runner carrying somebody's leftover login should not silently publish as them.

The token prints once, because it exists once — the registry keeps a hash and cannot produce it again.

The reminder goes to stderr, so piping the command into a secret store captures the token alone.

termcade keys list shows name, handle and last use; termcade keys revoke <id> kills one.

Verification

go vet clean, full suite passes. On a scratch stack: created a key, deleted the session file entirely, and published aviorstudio/tetris from its real GitHub release with only TERMCADE_TOKEN set. A key scoped to a different handle was refused and created nothing.

🤖 Generated with Claude Code

`termcade keys` manages publish credentials, and `termcade publish`
takes one from TERMCADE_TOKEN. That is what lets a release workflow
publish on a machine nobody is logged in to.

The environment wins over a stored session, deliberately: a runner with
somebody's leftover login should not silently publish as them.

The token prints once, because it exists once — the registry keeps a
hash and cannot produce it again — and the reminder goes to stderr so
piping the command to a secret store still captures the token alone.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@nicodes
nicodes merged commit 5fa7d1c into main Aug 3, 2026
1 check passed
@nicodes
nicodes deleted the publish-from-ci branch August 3, 2026 16:43
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.

1 participant