Skip to content

Global .npmrc not using authentication for custom registry #14433

Closed

Description

@lenovouser

What version of Bun is running?

1.1.30+7996d06b8

What platform is your computer?

Darwin 23.6.0 arm64 arm

What steps can reproduce the bug?

Use a global config like this:

@slug:registry=https://my-registry.tld/
//my-registry.tld/:_authToken="<token>"

and a project config like this:

@slug:registry=https://my-registry.tld/

https://my-registry.tld/:always-auth=true

auto-install-peers=true
engine-strict=true
prefer-frozen-lockfile=true
resolution-mode=highest
save-exact=true
save-prefix=''
strict-peer-dependencies=true
update-notifier=true

What is the expected behavior?

It should install the dependencies correctly

What do you see instead?

error: GET https://my-registry.tld/@slug%2fpackage-1 - 401

error: GET https://my-registry.tld/@slug%2fpackage-2 - 401

Additional information

#13990

Activity

  1. added
    bug
    on Oct 9, 2024
  2. self-assigned this
    on Oct 9, 2024
  3. added
    bun install
    and removed on Oct 9, 2024
  4. jonguenther commented on Nov 8, 2024

    @jonguenther

    Hitting the same issue on same OS & v1.1.34 with bunfig.toml:

    [install.scopes]
    "@org" = {url="https://npm.pkg.github.com/",token="$npm_token"}

    which leads to following error

    error: GET https://npm.pkg.github.com/@org%2fpackage-name - 401
    error: @org/package-name@^version failed to resolve
    
  5. dbryar commented on Nov 27, 2024

    @dbryar

    it could be the braces on the env var. That was the issue in my org setup

    see #4654

  6. added a commit that references this issue on Dec 4, 2024
    7eb8a3f
  7. alexgorbatchev commented on Nov 25, 2025

    @alexgorbatchev

    Same issue on 1.3.1, however 1.3.3 seems to be working fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugbun install

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions