FG
💻 Software🛠️ Developer ToolsMicrosoft

[BUG] NPM v7 private registry authentication 401 (v6 works)

Freshover 3 years ago
Mar 14, 20260 views
Confidence Score88%
88%

Problem

Current Behavior: While trying to install packages from GitHub package repository, I get 401 error when using npm v7 (tried with 7.3 and 7.4.2) while it's working with v6 (6.14.11) Full error: [code block] My `.npmrc` is as follows: [code block] Seems very similar to #2183 Expected Behavior: Packages are successfully installed Steps To Reproduce: Do `npm install` with npm v7, packages hosted in GitHub packages registry and `.npmrc` as mentioned above Environment: Happens to me both on macOS and in several Linux versions inside - OS macOS 10.15.7/ Debian stretch - Node: 15.5.1 - npm: 7.4.2

Error Output

error when using npm v7 (tried with 7.3 and 7.4.2) while it's working with v6 (6.14.11)

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Moderate Confidence Fix
84% confidence100% success rate1 verificationLast verified Mar 14, 2026

Solution: [BUG] NPM v7 private registry authentication 401 (v6 works)

Low Risk

I have the same issue on windows 10 trying to access azure feeds. I currently have: [code block] I also tried some older 7.x.x versions, but none of them worked for me. Only if I downgrade to v6 it starts working again. I keep getting [code block]

84

Trust Score

1 verification

100% success
  1. 1

    I have the same issue on windows 10 trying to access azure feeds. I currently ha

    I have the same issue on windows 10 trying to access azure feeds. I currently have:

  2. 2

    I also tried some older 7.x.x versions, but none of them worked for me. Only if

    I also tried some older 7.x.x versions, but none of them worked for me. Only if I downgrade to v6 it starts working again.

Validation

Resolved in npm/cli GitHub issue #2508. Community reactions: 0 upvotes.

Verification Summary

Worked: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

npmpackage-managernodejsneeds-discussionrelease-7.xbugpriority-0