Skip to content

feat: optional ghcr-token for user-owned packages - #52

Merged
cshuttle merged 1 commit into
mainfrom
feat/ghcr-token-secret
Aug 4, 2026
Merged

feat: optional ghcr-token for user-owned packages#52
cshuttle merged 1 commit into
mainfrom
feat/ghcr-token-secret

Conversation

@cshuttle

@cshuttle cshuttle commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Second finding from the first real release — this one only reachable by running it.

What happened

##[error]ghcr.io/cshuttle/topology:latest does not exist — nothing to promote.

It exists. Its digest reads fine from a workstation. The registry returns the same not found for an unauthorised read, and cshuttle is a personal account: a package bootstrapped by a manual push is user-owned, so the repo-scoped GITHUB_TOKEN 403s on it. Topology's own build.yml has pushed with a classic PAT since July for precisely this reason, documented in its header — the release path simply had no way to do the same.

Changes

  • Optional ghcr-token secret, used for the crane login when supplied, GITHUB_TOKEN otherwise. Repos that push with a PAT pass the same PAT.
  • The error message is rewritten. It stated absence as fact for what is almost always auth, which would have sent the next person hunting for a missing tag instead of a missing grant. It now prints crane's own message and names both fixes — pass the token, or grant the repo access under the package's Manage Actions access settings and drop the secret.

Why minor, not patch

Callers gain an input some of them need to set. Nothing breaks for a caller that omits it.

The first real release failed with "ghcr.io/cshuttle/topology:latest does not
exist" — for an image whose digest reads fine from a workstation. The registry
returns the same not-found for an unauthorised read, and cshuttle is a personal
account: a package bootstrapped by a manual push is USER-owned, so the
repo-scoped GITHUB_TOKEN 403s on it. Topology's own build workflow has used a
classic PAT for exactly this reason since July; the release path had no way to.

Adds an optional ghcr-token secret, used for the crane login when supplied.
Also rewrites the error, which confidently blamed absence for what is almost
always auth and would have sent the next person hunting for a missing tag.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@cshuttle
cshuttle merged commit afc5766 into main Aug 4, 2026
6 checks passed
@cshuttle
cshuttle deleted the feat/ghcr-token-secret branch August 4, 2026 13:25
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