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

bun install - azure private feeds not supported? #1233

Closed
Catharsis68 opened this issue Sep 12, 2022 · 3 comments
Closed

bun install - azure private feeds not supported? #1233

Catharsis68 opened this issue Sep 12, 2022 · 3 comments
Labels
bun install Something that relates to the npm-compatible client enhancement New feature or request

Comments

@Catharsis68
Copy link

Version: 0.1.11

Not sure if this is a bug or more a feature request:

Currently it is not possible to use feeds from Azure Artifcats as private npm package registry together with bun install.

According to the documentation, authentication to the azure servers requires a .npmrc file with this syntax (protocol relative url)

# Set the private azure registry for 'my-private-package' scoped packages
my-private-package:registry=https://<ORGANIZATION_NAME>.pkgs.visualstudio.com/_packaging/<FEED_NAME>/npm/registry/

; begin auth token
//<ORGANIZATION_NAME>.pkgs.visualstudio.com/_packaging/<FEED_NAME>/npm/registry/:always-auth ="true"
//<ORGANIZATION_NAME>.pkgs.visualstudio.com/_packaging/<FEED_NAME>/npm/registry/:username="some string"
//<ORGANIZATION_NAME>.pkgs.visualstudio.com/_packaging/<FEED_NAME>/npm/registry/:_password="<base64-secret>"
//<ORGANIZATION_NAME>.pkgs.visualstudio.com/_packaging/<FEED_NAME>/npm/registry/:email="some email address"
; end auth token

I created a .bunfig.toml file:

"my-private-package" = { url = "https://<ORGANIZATION_NAME>.pkgs.visualstudio.com/_packaging/<FEED_NAME>/npm/registry" }
"//<ORGANIZATION_NAME>.pkgs.visualstudio.com/_packaging/<FEED_NAME>/npm/registry/:always-auth" = "true"
"//<ORGANIZATION_NAME>.pkgs.visualstudio.com/_packaging/<FEED_NAME>/npm/registry/:username" = "some string"
"//<ORGANIZATION_NAME>.pkgs.visualstudio.com/_packaging/<FEED_NAME>/npm/registry/:_password" = "<base64-secret>"
"//<ORGANIZATION_NAME>.pkgs.visualstudio.com/_packaging/<FEED_NAME>/npm/registry/:email" = "some email address"

npm i is working, bun install throws a 401 Unauthenticated error.

Any thoughts here?

@Electroid
Copy link
Contributor

We will support this, but don't right now. We're tracking support for .npmrc here: #643

@Electroid Electroid added enhancement New feature or request bun install Something that relates to the npm-compatible client labels Nov 3, 2022
@zachbryant
Copy link

I was able to get my private azure feeds to authenticate (for the most part). Not sure why I could now, but I copied in the same username with base64-decoded PAT as password and it works. Only one of my registries doesn't work for some reason that isn't explained beyond 401.

@zachbryant
Copy link

I also don't think azure specifically requires that npmrc format, it just looks like what they give you as instructions for how to connect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bun install Something that relates to the npm-compatible client enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants