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

[Bug]: Using a port in a url with a private registry prevents auth from working causing a 403 #1443

Closed
snakethatlovesstaticlibs opened this issue Jan 12, 2024 · 0 comments · Fixed by #1444
Labels
bug Something isn't working untriaged Requires traige

Comments

@snakethatlovesstaticlibs

What happened?

We have an npmrc file with auth specified in ~.npmrc,

It looks kind of like

registry=https://private/api/npm/npm
@thing:registry=https://private/api/npm/npm

In yarn.lock we have URLs that sometimes look like https://private:443/artifactory/api/npm/npm/.... Notice the port.

_get_npm_imports fails to account for this, which means that auth isn't sent, which means requests 403

Version

Development (host) and target OS/architectures:

Output of bazel --version: 7.0.0

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file: rules_js-1.35.0

Language(s) and/or frameworks involved: JS, yarn.lock

How to reproduce

Have a yarn.lock which contains ports in urls that have private registries, see that the home npmrc auth is no longer passed through to the download call

Any other information?

PR coming soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged Requires traige
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant