We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In the project I have the following .yarnrc.yml:
httpTimeout: 30000 nodeLinker: node-modules npmAlwaysAuth: true npmRegistryServer: 'https://company.xyz/api/npm/registry' npmPublishRegistry: 'https://company.xyz/api/npm/registry' yarnPath: .yarn/releases/yarn-4.5.0.cjs
yarn npm login is successful but when running yarn npm info lodash I get an error
yarn npm login
yarn npm info lodash
➤ YN0041: Invalid authentication (as an anonymous user)
If I add the npmAlwaysAuth to the registry specific config in ~/.yarnrc.yml, the npm info works. My ~/.yarnrc.yml:
npmAlwaysAuth
~/.yarnrc.yml
npmRegistries: "https://company.xyz/api/npm/registry": npmAlwaysAuth: true # This is required npmAuthToken: ***
It seems to also work if I add this to project .yarnrc.yml:
.yarnrc.yml
npmRegistries: 'https://company.xyz/api/npm/registry': npmAlwaysAuth: true
Shouldn't the top level npmAlwaysAuth in the project force the authentication for all requests to all registeries like wanted?
See description above.
System: OS: macOS 14.6.1 CPU: (10) arm64 Apple M1 Pro Binaries: Node: 18.19.0 - /private/var/folders/jx/6_rpw_wd31bc2sxg5brx5j780000gn/T/xfs-25f595b7/node Yarn: 4.5.0 - /private/var/folders/jx/6_rpw_wd31bc2sxg5brx5j780000gn/T/xfs-25f595b7/yarn npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Self-service
Describe the bug
In the project I have the following .yarnrc.yml:
yarn npm login
is successful but when runningyarn npm info lodash
I get an error➤ YN0041: Invalid authentication (as an anonymous user)
If I add the
npmAlwaysAuth
to the registry specific config in~/.yarnrc.yml
, the npm info works. My~/.yarnrc.yml
:It seems to also work if I add this to project
.yarnrc.yml
:Shouldn't the top level npmAlwaysAuth in the project force the authentication for all requests to all registeries like wanted?
To reproduce
See description above.
Environment
System: OS: macOS 14.6.1 CPU: (10) arm64 Apple M1 Pro Binaries: Node: 18.19.0 - /private/var/folders/jx/6_rpw_wd31bc2sxg5brx5j780000gn/T/xfs-25f595b7/node Yarn: 4.5.0 - /private/var/folders/jx/6_rpw_wd31bc2sxg5brx5j780000gn/T/xfs-25f595b7/yarn npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm
Additional context
No response
The text was updated successfully, but these errors were encountered: