Skip to content

Commit 254cbd6

Browse files
OGsijiclaude
andcommitted
docs: clarify that GitHub rejects secret names starting with GITHUB_
Confirmed real trip-up: the secret storing a cross-repo PAT and the workflow's local GITHUB_TOKEN env var have confusingly similar names, and GitHub's UI hard-rejects any secret name with a GITHUB_ prefix. Make the distinction between the two impossible to miss. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 301966a commit 254cbd6

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

‎README.md‎

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,16 +273,25 @@ same 404-looks-like-a-typo symptom as above. To fix it:
273273
scoped to just that repo's Contents (read-only) is the least-privilege
274274
option; a classic PAT with the `repo` scope also works.
275275
2. In the repo running the workflow (your dbt repo): **Settings → Secrets
276-
and variables → Actions → New repository secret**. Name it something
277-
like `API_REPO_TOKEN` and paste the token as the value.
276+
and variables → Actions → New repository secret**. Name it `API_REPO_TOKEN`
277+
(or similar) and paste the token as the value.
278+
279+
> ⚠️ **GitHub rejects any secret name starting with `GITHUB_`** — it's a
280+
> reserved prefix. You cannot create a secret literally called
281+
> `GITHUB_TOKEN`; that's not a naming suggestion, the UI will refuse it.
278282
3. Point the workflow's `GITHUB_TOKEN` env var at that secret instead of the
279-
default one:
283+
default one — these are two different things with confusingly similar
284+
names:
280285
```yaml
281286
env:
282287
GITHUB_TOKEN: ${{ secrets.API_REPO_TOKEN }}
288+
# ^^^^^^^^^^^ this is just a local variable name, can be anything
289+
# ^^^^^^^^^^^^^^ this is the *secret*, whose
290+
# name is what GitHub restricts
283291
```
284-
(The env var read by the CLI is always named `GITHUB_TOKEN`; the *secret*
285-
backing it can be named anything.)
292+
The env var read by the CLI must be named `GITHUB_TOKEN` (left side); the
293+
*secret* backing it (right side, after `secrets.`) is what needs a
294+
different name, and can be anything that isn't `GITHUB_`-prefixed.
286295

287296
If the target repo is public, none of this is needed — the default
288297
`secrets.GITHUB_TOKEN` (or no token at all, at a lower rate limit) works

0 commit comments

Comments
 (0)