Skip to content

release: HOMEBREW_TAP / SCOOP_BUCKET GitHub tokens expired → GoReleaser post-publish fails (401) #280

Closed

Description

@scttfrdmn

Symptom

The v0.69.0 release workflow reported failure, but the core release succeeded: the GitHub Release + all 18 assets (spawn/spored × linux/darwin/windows × amd64/arm64 + .deb/.rpm/.tar.gz + checksums) published fine. GoReleaser failed only at the post-publish tap push:

homebrew formula: could not get default branch: GET https://api.github.com/repos/spore-host/homebrew-tap: 401 Bad credentials
scoop manifests:  could not get default branch: GET https://api.github.com/repos/spore-host/scoop-bucket: 401 Bad credentials
release failed after 10m14s (exit 1)

Root cause

The HOMEBREW_TAP_GITHUB_TOKEN and SCOOP_BUCKET_GITHUB_TOKEN repo secrets are expired/invalid (401 Bad credentials). These are the cross-repo PATs GoReleaser uses to push the updated formula/manifest to spore-host/homebrew-tap and spore-host/scoop-bucket.

Impact

  • ✅ Direct-download / .deb / .rpm install of v0.69.0 works.
  • ❌ brew upgrade / scoop update still serve v0.68.1 until the taps are updated.
  • ⚠️ Because GoReleaser exited non-zero, the "Upload spored binaries to S3" step was skipped. I ran it out-of-band (uploaded 0.69.0 spored to the 4 US spawn-binaries-* buckets — latest + versioned paths, checksums verified), so instance bootstrap / spawn upgrade-spored correctly pull 0.69.0. But that step should not be gated behind the tap push.

Fix

  1. Rotate the two secrets (HOMEBREW_TAP_GITHUB_TOKEN, SCOOP_BUCKET_GITHUB_TOKEN) with fresh PATs scoped to push to the tap/bucket repos (repo-admin action — not doable from CI).
  2. Re-run the v0.69.0 release workflow (or goreleaser release locally) to push the taps — the release itself is idempotent-safe for the brew/scoop step.
  3. Harden the workflow: move "Upload spored binaries to S3" to run even if GoReleaser's tap push fails (e.g. a separate job, or if: always() after a step that captures GoReleaser success-vs-tap-failure), so an expired distribution token can't block spored delivery to instances. Consider continue-on-error on the brew/scoop publishers, or split announce/tap into a non-blocking post-step.

Discovered cutting v0.69.0 (the first release since v0.68.1).

Activity

  1. scttfrdmn commented on Jul 8, 2026

    @scttfrdmn
    ContributorAuthor

    Resolved — 0.69.0 taps pushed + auto-push secrets restored

    Immediate (0.69.0 now installable via brew/scoop): pushed the updated formula/manifest directly to the tap repos (I have admin/push on both):

    • homebrew-tap Formula/spawn.rb → 0.69.0 (commit 491750e)
    • scoop-bucket bucket/spawn.json → 0.69.0 (commit df6d8d5)

    Both verified at version 0.69.0. brew upgrade / scoop update serve 0.69.0.

    Auto-push restored: re-set HOMEBREW_TAP_GITHUB_TOKEN + SCOOP_BUCKET_GITHUB_TOKEN on spore-host/spawn (2026-07-08). Verified the new token succeeds on the exact call that 401'd — GET /repos/spore-host/{homebrew-tap,scoop-bucket} returns 200 with push=true — so the next release's GoReleaser tap step will publish automatically.

    Follow-ups (leaving this open)

    1. Secret hygiene: the secrets are currently set to a classic repo-scoped token tied to a maintainer account. Replace with a fine-grained PAT scoped to Contents:write on just homebrew-tap + scoop-bucket (least privilege), and set an expiry reminder so it doesn't silently lapse between releases again (root cause here: the previous token expired ~06-26, unused until the first release since = today).
    2. Workflow hardening (still valid): move "Upload spored binaries to S3" so a tap-push failure can't skip it — a distribution-token lapse should never block spored delivery to instances. (0.69.0 spored was uploaded to the spawn-binaries-* buckets out-of-band; that's fine, but the coupling should be fixed.)
  2. scttfrdmn commented on Jul 9, 2026

    @scttfrdmn
    ContributorAuthor

    Workflow hardening done (PR #281, merged)

    The 'Upload spored binaries to S3' + AWS-creds steps now run with if: ${{ !cancelled() }}, so a Homebrew/Scoop tap-push failure can no longer skip spored delivery to instances — the exact coupling that bit v0.69.0 (I'd had to run that upload out-of-band). A genuinely early GoReleaser failure still fails the S3 step loudly on missing dist/ artifacts.

    Remaining (operator, non-blocking)

    Only follow-up #1 is left: replace the HOMEBREW_TAP_GITHUB_TOKEN / SCOOP_BUCKET_GITHUB_TOKEN secrets (currently a working classic repo-scoped token) with a fine-grained PAT scoped to Contents:write on homebrew-tap + scoop-bucket only, plus a calendar reminder before its expiry — the root cause here was a silently-lapsed token between releases. Needs UI/browser PAT minting, so it stays with a human. Suggest keeping this issue open until that's done, or closing now that both live symptoms (0.69.0 taps + S3, and the skip-coupling) are resolved.

  3. scttfrdmn commented on Jul 9, 2026

    @scttfrdmn
    ContributorAuthor

    PAT request set up → docs/release-tap-token.md (PR #282, merged)

    The remaining follow-up is now a zero-guesswork runbook. To close #280, an org owner needs to (per the doc):

    1. Mint a fine-grained PAT — resource owner spore-host (org; may need org approval), repos homebrew-tap + scoop-bucket, Contents: read/write only, with an expiry + calendar reminder.
    2. Set both secrets: gh secret set HOMEBREW_TAP_GITHUB_TOKEN / SCOOP_BUCKET_GITHUB_TOKEN on spore-host/spawn (commands in the doc). (I can run this half once the PAT exists.)
    3. Verify: GH_TOKEN=<pat> gh api repos/spore-host/homebrew-tap --jq .default_branch → main (not 401).

    Everything else on this issue is done: 0.69.0 taps + S3 published, auto-push secrets working, and the S3-upload-skip coupling fixed (#281). Safe to close once the fine-grained PAT is in place.

  4. scttfrdmn commented on Jul 9, 2026

    @scttfrdmn
    ContributorAuthor

    Resolved — fine-grained PAT installed, auto-publish restored

    The tap-push secrets (HOMEBREW_TAP_GITHUB_TOKEN / SCOOP_BUCKET_GITHUB_TOKEN on spore-host/spawn) are now backed by a fine-grained PAT (resource owner spore-host, repos homebrew-tap + scoop-bucket, Contents: read/write). Verified against the exact call that 401'd:

    • GET repos/spore-host/homebrew-tap → default=main, push=true
    • GET repos/spore-host/scoop-bucket → default=main, push=true

    So the next v* release will auto-publish the taps.

    Full issue recap — all done:

    Closing.

  5. added a commit that references this issue on Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions