-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 not using auth
property in .npmrc on different registry url
#7191
Comments
✨ This is an old work account. Please reference @brandonchinn178 for all future communication ✨ My company is also using Nexus, and instead of adding credentials to It seems like whenever we run // package.json
"foo": "0.2.0"
// yarn.lock
foo@0.1.0
... (this happens because we're using yarn workspaces, and maybe someone adds a dependency on their branch, but master upgraded that dependency and updated the lockfile to only include the new version) We noticed that when running with
logs, but then later we see
which is the command that fails. Possibly some branch in yarn-registry resolution doesn't account for user credentials? |
After a year, this still happens. from |
Same issue. |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
My company has a Nexus registry that hosts the package binaries. However, we access this registry through a proxy.
That is, the registry URL is set to
https://nexus-proxy.mycompany.com/nexus/content/groups/npm-all/
. When looking up a package on there, the URL to the binary points to the registry server itself, e.g.https://nexus.mycompany.com/nexus/content/groups/npm-all/somepackage/-/somepackage-0.1.0.tgz
.The basic authentication is stored base64 encoded in the
.npmrc
file.The URL of the registry proxy is set as the registry in both
.npmrc
and.yarnrc
.When running a
yarn
oryarn add
, the proxy is accessed no problem (returns a 200), but when going to download the actual binary from the actual registry server, a 401 is returned, I imagine because the authentication information is not being sent to the other URL.What is the expected behavior?
yarn should pass the authentication information to the other URL when downloading binaries.
npm install
does this properly, as does older versions ofyarn
(I tried 0.27.5).Please mention your node.js, yarn and operating system version.
The text was updated successfully, but these errors were encountered: