-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Split authentication from .npmrc
to separate file
#1010
Comments
If I'm not mistaken, what you said can already be done. Just as you said,
My current setup works like this: every token goes into Not sure if it works with settings other than registry though. |
@zypA13510, the difference between what is requested and what currently exists is a matter of "centralized" vs "decentralized" (w/re: project/package) configuration. What exists allows splitting authentication from the rest of the project configuration, but only in a single centralized location: the user-wide What is requested is a new file, i.e. sibling to |
npm If your bug is preproducible on If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo Closing: This is an automated message. |
1 similar comment
npm If your bug is preproducible on If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo Closing: This is an automated message. |
Split authentication aspect of
.npmrc
to a separate file. This will allow per-project npm configuration, for example of theregistry
andalways-auth
values, to be source controlled and not impacted by specific authentication requirements of an (e.g. development) environment. That is: configuring registry authentication is separate from other configuration; authentication can be configured system-wide/globally ("prefix";$PREFIX/etc/npmrc
), configured at the user-level ("userconfig";$HOME/.npmrc
), configured per-project ($PWD/.npmrc
), or configured on the CLIor via environment variables, without modifying a source-controlled file.Previous requests:
circa 2014, re:
_auth
: npm/npm#4905circa 2017, re:
_authToken
: npm/npm#17812Particularly, npm/npm#17812 has a very good rationale and breakdown of the situation, including examples of other projects/situations where this is common practice. More importantly, the author and commenters of that issue have expressed interest in implementing this capability.
Possibly related, indicating that authentication cannot be configured by environment variables (and perhaps then also via CLI): #290
The text was updated successfully, but these errors were encountered: