-
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
Private registry documentation clarification #4654
Comments
+1 |
Shouldn't it be [install.scopes]
"@company" = { token = "<access token>", url = "https://gitlab.com/api/v4/projects/<id>/packages/npm/" } ? And btw
|
These aren't comments. They are actually used in I did try the way you have mentioned however @Frederick888 and the main issue is not being able to have multiple things assigned to that |
You mentioned in the description yourself you had
|
Yes they were included in the bunfig as an example of what I believe is a currently unsupported use case. I understand that beginning lines with // is unsupported in toml and wondering how we can include those extra lines of mapping. Apologies for being unclear. |
Same problem with Codeartifact on AWS, even when |
registry = _auth = email = always-auth = true strict-ssl = false @FortAwesome:registry=https://npm.fontawesome.com/ how would i convert the above to bunfig.toml |
Global Registry[install] Scoped Registries[install.scopes] |
@choopk is that token you have referenced the same one as |
the _auth goes to registry = "https://{email}:{token}@https://{org}/repository/npm-group/" _authToken goes to fortawesome = { url = "https://npm.fontawesome.com/", token = "" } however the initial installation took forever and never completed and failed. |
Thanks for clarifying. I ended up getting it to work for gitlab registries by rotating my key and making sure it had all required permissions. Now have set it up identically to what @Frederick888 mentioned above and didn't have to add anything else for |
The docs should definitely clarify that the PAT is not base64 encoded in the password field |
Took a longggg time to get this working with multiple registries (GitHub private, and npm public), but eventually got there.
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)
|
Your solution unfortunately didn't work for Font Awesome. Here's what my
|
No, Font Awesome's prefix is indeed @fortawesome. |
Is there a way do this without needing to store tokens/passwords in |
Bun will read environment variables from the |
I have had the same issue and combining everything here and bun docs resolved my issues to some extend but the final catch was for private repositories it was throwing initially 404 and then with some changes 403s. here is my .npmrc
and this is similar stuff converted into bunfig.toml
and at this point of was getting 403s. The reason was that a missing |
Not sure if exactly related but I had been trying to add/update my |
None of these configs work for @fortawesome/fontawesome. I was having high hopes for bun but this is too simple to ignore. I am discounting it now as a possible alternative to npm install. Also had issues with bundle splitting when building. The only thing left that might be viable is bun test. |
I finally fixed it, there were a couple of gotchas:
|
I would appreciate some help as I can't me it work. My organisation have several packages on a hosted Sonatype Nexus Repository and no matter how i set the scope, bun always search our packages on registry.npmjs.org where they're obviously missing.
Am i doing it a wrong way? I tried it on canary as well, with the same results and i'm on windows. Update: so the problem is related that our packages doesn't belong to any scopes. they just lies inside our private repository like "package-1.0.1" and "lister-1.0.0" and not like "@private/package-1.0.1" Is there a workaround for this? |
What is the type of issue?
Documentation is missing, Documentation is incorrect
What is the issue?
Private registries coming from Gitlab private repos (and potentially other places) utilise
npm config set
and put multiple lines in the.npmrc
file. Not sure if this should be a feature request or a documentation request.I am trying to figure out how to translate those into the
bunfig.toml
format as not sure where to place individual lines starting with//gitlab
Working
npmrc
Not working
bunfig.toml
Thanks in advance
Where did you find it?
https://bun.sh/docs/install/registries
The text was updated successfully, but these errors were encountered: