Skip to content
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

Wrong auth for scoped packages in private registries #2151

Closed
donaldpipowitch opened this issue Dec 5, 2016 · 2 comments
Closed

Wrong auth for scoped packages in private registries #2151

donaldpipowitch opened this issue Dec 5, 2016 · 2 comments
Labels

Comments

@donaldpipowitch
Copy link
Contributor

donaldpipowitch commented Dec 5, 2016

Do you want to request a bug?
bug

What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce.

When a custom registry for scoped packages is used the authentification for the default registry is used. E.g. in my project I have a .npmrc like this:

strict-ssl=false
@some-scope:registry=https://npm-registry.our-company.lan/repository/npm-registry/

In my ~/.npmrc I'm authenticated with the public npm registry:

//registry.npmjs.org/:_authToken=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Now I call $ yarn to install deps and get error Couldn't find package "@some-scope/some-package" on the "npm" registry.. (This is actually a 401 error, not 404! See #2152 for this incorrect error message.)

What is the expected behavior?

Don't use the _authToken for registry.npmjs.org when I use the private registry for @some-scope so @some-scope/some-package can be installed correctly.

Please mention your node.js, yarn and operating system version.

$ node -v
v6.9.1

$ yarn -V
0.18.0

macOS 10.12.1
@kyeotic
Copy link

kyeotic commented Feb 2, 2017

I'm working around this right now with an alias that moves the ~/.npmrc file to a backup, installs from yarn, then restores the ~/.npmrc file.

@danez
Copy link
Contributor

danez commented Jun 14, 2017

This is fixed by #3231 in 0.26.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants