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

Need to redeclare default registry with scopes #5497

Open
Electroid opened this issue Sep 15, 2023 · 2 comments
Open

Need to redeclare default registry with scopes #5497

Electroid opened this issue Sep 15, 2023 · 2 comments
Assignees
Labels
bug Something isn't working npm Something that relates to the npm-compatible client

Comments

@Electroid
Copy link
Contributor

Electroid commented Sep 15, 2023

Took a longggg time to get this working with multiple registries (GitHub private, and npm public), but eventually got there.

Because GitHub doesn't forward a MISS to npm

If adding a scoped registry, you have to redeclare the default registry!

[install]
registry = "https://registry.npmjs.org" # redeclare default!

[install.scopes]
"@acme" = { token = "$ACME_TOKEN", url = "https://npm.pkg.github.com/" }
#                     ^ loads from .env file(s)
# add any other scoped registries (with their own access tokens)

Originally posted by @lukeed in #4654 (comment)

@Electroid Electroid added bug Something isn't working npm Something that relates to the npm-compatible client labels Sep 15, 2023
@lukeed
Copy link

lukeed commented Sep 15, 2023

Relatedly, install should allow multiple registries to be configured. That's a core part of .npmrc (esp root level)

@Jarred-Sumner
Copy link
Collaborator

@dylan-conway does this still occur? Do we have any tests that check this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working npm Something that relates to the npm-compatible client
Projects
None yet
Development

No branches or pull requests

4 participants