Skip to content

ci(binaries): let checkout do the tap authentication - #66

Merged
vyncint merged 1 commit into
mainfrom
tap-auth-via-checkout
Aug 23, 2026
Merged

ci(binaries): let checkout do the tap authentication#66
vyncint merged 1 commit into
mainfrom
tap-auth-via-checkout

Conversation

@vyncint

@vyncint vyncint commented Aug 23, 2026

Copy link
Copy Markdown
Owner

The first run with HOMEBREW_TAP_TOKEN set failed at git:

fatal: unable to access 'https://x-access-token:***@github.com/vyncint/homebrew-tap.git/':
URL rejected: Malformed input to a URL function

Splicing a credential into a remote URL is the fragile way to do this — anything in the token that is not URL-safe takes the whole URL down, and the error names the URL rather than the credential inside it, which is not where anyone would look. actions/checkout authenticates properly, so the job now clones the tap that way and pushes back through the same credential.

And a check that says which problem it is

The job now validates the token before anything uses it, reporting a length and a yes/no on its character set — no secret material. A value pasted with a trailing newline looks completely normal in the secrets UI:

value len verdict
github_pat_11ABCDEF_abc123XYZ 29 accepted
same, with a trailing newline 30 rejected
same, with an embedded space 20 rejected

So the next run tells us definitively whether the token needs re-adding or whether the URL splicing was the whole problem — rather than leaving both possible.

All five binary targets were green on that run; only the formula job failed.

The first run with the token set failed at git:

  fatal: unable to access 'https://x-access-token:***@github.com/...':
  URL rejected: Malformed input to a URL function

Splicing a credential into a remote URL is the fragile way to do this --
anything in the token that is not URL-safe takes the whole URL down, and
the error names the URL rather than the credential inside it, which is
not where anyone looks. actions/checkout authenticates properly and is
the well-trodden path; the job now clones the tap that way and pushes
back through the same credential.

It also checks the token before anything uses it, and reports on it
without revealing it: a length, and a yes/no about its character set. A
value pasted with a trailing newline looks entirely normal in the
secrets UI and fails at first use with a message about URLs. Now it fails
immediately with the reason and the command that fixes it.

Signed-off-by: Vyncint Ng <115854244+vyncint@users.noreply.github.com>
@vyncint
vyncint merged commit 17a4f14 into main Aug 23, 2026
11 checks passed
@vyncint
vyncint deleted the tap-auth-via-checkout branch August 23, 2026 08:17
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