When attempting to install dependencies in GitHub Actions from GitHub Package Registry, I get random 401/403 errors.
It seems that npm install follows a certain pattern for every dependency:
- A request is made to https://npm.pkg.github.com/%ORGANIZATION%/dependency-name
- If the dependency is not on GitHub Package Registry, a request is made to https://registry.npmjs.org/dependency-name/-/dependency-name-version.tgz
That first call often fails with a 401 or 403. It seems that this is happening for different packages every time.
However, most of the requests just succeed with a 200 and I have verified (using npm whoami) that I am correctly authenticated to GitHub Package Registry.
I also tried regenerating my personal access token, but that doesn’t seem to help.
Anyone who had similar issues and found a way to solve them?