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

yarn install with full path to private registry in .npmrc fails #8203

Open
pnewhook opened this issue Jun 26, 2020 · 2 comments
Open

yarn install with full path to private registry in .npmrc fails #8203

pnewhook opened this issue Jun 26, 2020 · 2 comments

Comments

@pnewhook
Copy link

Bug description

My team uses Artifactory as a mirror to to the public NPM registry. All packages are downloaded from Artificatory, never npm directly. However I've found that yarn can't authenticate against a private registry if the full path is given. i.e. in my .npmrc this works

registry = https://myrepo.jfrog.io/

but this doesn't

registry = https://myrepo.jfrog.io/hooppisg/api/npm/my-private-registry

This user appears to be having the same problem: #4451 (comment). NPM install works fine in either case. And with the shorter registry URL yarn install won't work without specifying the registry.

Command

yarn install

What is the current behavior?

 C:\Users\pnewhook\dev\isg-core\settlement-workflow\settlement-dashboard-ui> yarn install
yarn install v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
error An unexpected error occurred: "https://myrepo.jfrog.io/hooppisg/api/npm/my-private-registry/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.8.3.tgz: Request failed \"401 Unauthorized\"".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\me\\dev\\project\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

What is the expected behavior?
I'd expect the packages to be downloaded from my registry.

Steps to Reproduce

  1. Configure a non-default registry in .npmrc with authentication, using the full path to the repo, not just the host.
  2. yarn install

Environment

Yarn version:
1.22.4

Node version:
12.18.0

Platform:
win32 x64

@KL-James
Copy link

If you can, try reinstalling the yarn command line and try the catastrophe

@doppelganger113
Copy link

Was there a solution to this? Experiencing the same issue with yarn where npm works

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

No branches or pull requests

3 participants