NPM Install from GH Packages: works locally but not in GH action #25587
-
Hello, I have published a private package to our org’s package repository. As per the documentation I added an .npmrc file to another project’s root with the following content:
In my local ~/.npmrc the sits my Authtoken for npm.pkg.github.com I installed the published package in my package.json with the following entry in the package.json
When installing locally this works fine. When installing via Github Actions the installation fails with the following error:
It seems like “my-org” is used two times in the path to the package? Why does it work locally but not in Github Actions? Originally my .npmrc only was like this (no org added to the registry URL):
Thas *also* workes fine locally. It also works for all scoped packages (like @coogle-cloud) in the github Action but did *not* work for unscoped packages:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
so, I took my personal accesstoken (which worked locally) and commited, now the install workflow suceeds. The documentation (https://help.github.com/en/github/managing-packages-with-github-packages/using-github-packages-with-github-actions) says: “the GITHUB_TOKEN has read:packages and write:packages scopes.” Isn’t that sufficient? My personal access token has delete:packages, read:packages, repo, write:packages. |
Beta Was this translation helpful? Give feedback.
-
buried in some arbitrary twitter thread is the information that the GITHUB_TOKEN only has access to the current repo. https://twitter.com/char_fish/status/1191442780729556993?s=21 would be nice if this would have been explicitely stated somewhere. |
Beta Was this translation helpful? Give feedback.
buried in some arbitrary twitter thread is the information that the GITHUB_TOKEN only has access to the current repo.
https://twitter.com/char_fish/status/1191442780729556993?s=21
would be nice if this would have been explicitely stated somewhere.