github tarball url in package-lock breaks builds that use private registries and always-auth = true
See original GitHub issueFor users who:
- Are using a private npm registry like Artifactory
- and running
npm install
in a docker build, - but do not want to (or cannot, for regulatory/security purposes) pollute their docker image with a github token,
… the following change has broken the installation of winston-daily-rotate-file
:
In the conditions above, this change produces the following error:
44 verbose stack Error: Unable to authenticate, need: Basic realm="GitHub"
44 verbose stack at /usr/local/lib/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:107:17
44 verbose stack at processTicksAndRejections (internal/process/task_queues.js:97:5)
45 verbose statusCode 401
46 verbose pkgid winston-transport@https://github.com/winstonjs/winston-transport/archive/868d6577956f82ee0b021b119a4de938c61645f7.tar.gz
The reason for this error seems to be that when always-auth = true
is in play npm attempts to authenticate with github instead of just fetching the tarball as a public non-authed user.
There doesn’t appear to be an easy fix for those of us who have the above requirements except to pin to an earlier version of the package and hope that the github URL eventually disappears from the package-lock.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
4.5.3 requires github access to install... · Issue #314
github tarball url in package-lock breaks builds that use private registries and always-auth = true #316. Closed. @Maciek416. Copy link ...
Read more >[BUG] NPM v7 private registry authentication 401 (v6 works)
When I fetch the tarball urls from the github registry, they do redirect, but the new auth is baked into the query parameters...
Read more >install private repositories · Issue #636 · microsoft/Oryx - GitHub
I have a private npm registry hosted in GitHub and this is how I have in my npm registry: Here the ${GITHUB_TOKEN} is...
Read more >[BUG] Automatic authentification on private npm repository no ...
We use a private nexus repository with an .npmrc file on each project. Our .npmrc looks like (URL changed for this bug report):....
Read more >Can't use handleRejections: true with DailyRotateFile and ...
The option handleRejections: true is supported by winston itself in ... github tarball url in package-lock breaks builds that use private ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Would the fix proposed in #315 actually solve this problem and the problem from #314 while making sure the ts typings work as expected (#297)?
Thanks for the feedback. I’ve merged #315 and pushed as
winston-daily-rotate-file@4.5.5
. This should hopefully address all of the problems in the best way possible. Meanwhile, I’ll trackwinston-transport
and will remove the workaround once a new version is pushed.