From 24301fe9fb18dd4b6b8e81b02d2f78ba73fd73c9 Mon Sep 17 00:00:00 2001 From: James Ottaway Date: Mon, 27 Jun 2022 09:28:13 +1000 Subject: [PATCH 1/2] docs: Include warning when configuring token to install private packages The distinction between `secrets.GITHUB_TOKEN` and `secrets.NPM_TOKEN` cost myself and a colleague numerous hours when we were trying to fix a GitHub Actions workflow which needed to install a private package from a different repository from our GitHub organisation. Given the issue dedicated to this point is closed, we should include a warning here to make it more clear why `secrets.GITHUB_TOKEN` will not work when passed to `npm ci`, in the presence of private packages from other GitHub Package repositories. --- docs/advanced-usage.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index 36c1ec8b3..e51f8abb2 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -247,3 +247,5 @@ steps: # `npm rebuild` will run all those post-install scripts for us. - run: npm rebuild && npm run prepare --if-present ``` + +NOTE: As per https://github.com/actions/setup-node/issues/49 you cannot use `secrets.GITHUB_TOKEN` to access private GitHub Packages within the same organisation. From 0ad06209dd6a907d8d744031025d5a9e225c7ed6 Mon Sep 17 00:00:00 2001 From: James Ottaway Date: Fri, 1 Jul 2022 09:12:46 +1000 Subject: [PATCH 2/2] Update advanced-usage.md --- docs/advanced-usage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index e51f8abb2..7e8b9c819 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -248,4 +248,4 @@ steps: - run: npm rebuild && npm run prepare --if-present ``` -NOTE: As per https://github.com/actions/setup-node/issues/49 you cannot use `secrets.GITHUB_TOKEN` to access private GitHub Packages within the same organisation. +NOTE: As per https://github.com/actions/setup-node/issues/49 you cannot use `secrets.GITHUB_TOKEN` to access private GitHub Packages within the same organisation but in a different repository.