Skip to content

Skip the automatic GitHub token on GitHub Enterprise runners - #72

Merged
RomainCscn merged 3 commits into
mainfrom
fix-ghe-token-default
Oct 5, 2026
Merged

RomainCscn merged 3 commits into
mainfrom
fix-ghe-token-default

Conversation

@RomainCscn

@RomainCscn RomainCscn commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

On GitHub Enterprise runners github.token is scoped to the enterprise instance, not github.com. install.sh sends it as a Bearer token to api.github.com to fetch release metadata, and the API rejects an unknown token with a 401 even for a public repo, so the install step fails. This has been broken since #60 for cli_version: latest, and for the default version since it moved past the legacy list in v0.17.0. Legacy versions still work because github.com/.../releases/download ignores the bad token.

github_token now defaults to ${{ github.server_url == 'https://github.com' && github.token || '' }}, so GHE runs fetch anonymously. Explicit tokens still pass through, and checksum verification is unchanged.

Anonymous calls can hit the 60/hour per-IP limit on shared runner IPs (see #62). A failed metadata fetch now prints an ::error:: pointing to github_token instead of a bare curl: (22), and the README suggests a no-permission fine-grained token for that case.

Fixes LIN-87430

@linear-code

linear-code Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

LIN-87430

@RomainCscn
RomainCscn merged commit 65ed0ec into main Oct 5, 2026
5 checks passed
@RomainCscn
RomainCscn deleted the fix-ghe-token-default branch October 5, 2026 08:33
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