[Feature] Support auth credentials per scope
See original GitHub issue- I’d be willing to implement this feature
- This feature can already be implemented through a plugin
I have two different packages on github and two separate accounts to access each one. So:
Account1
has access to package@scope1/package1
Account2
has access to package@scope2/package2
Both packages are hosted on the same package registry, so i need a way to configure different auth methods per package scope.
Would be nice if yarn would support specifying auth methods per package scope:
npmScopes:
my-company:
npmRegistryServer:
//registry.yarnpkg.com:
npmAuthIdent: "username1:password1"
npmAuthToken: "ffffffff-ffff-ffff-ffff-fffffffffff1"
my-company2:
npmRegistryServer:
//registry.yarnpkg.com:
npmAuthIdent: "username2:password2"
npmAuthToken: "ffffffff-ffff-ffff-ffff-fffffffffff2"
I don’t really know why it wasn’t implemented already, but it may be very difficult to implement. Also, this feature may degrade performance a lot.
I’ve tried to look into docs and on the internet, but it looks like doing this is not possible right now. Also, I’ve tried setting up npm to do this, but failed. Looks like hooks doesn’t provide a way to do it yet. But i may be wrong. Sadly, documentation on hook is scarce, but names for available hooks doesn’t look like they will allow implementing this as a plugin.
Additional context
Maybe I just wasn’t lucky and haven’t asked right questions and there is an easy config option to do it. But even if it is, it would be nice to see more clear example in documentation for this case.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Wow! Thanks!
No worry! Up for grab, then 🙂