yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.37k stars 2.72k forks source link

Private registry got error: An unexpected error occurred: "authorization required to access package xxx" #8988

Closed 0x0a0d closed 9 months ago

0x0a0d commented 9 months ago

for anyone who got this error

error An unexpected error occurred: "...: authorization required to access package xxx".
info If you think this is a bug, please open a bug report with the information provided in ".../yarn-error.log".

Edit as below in your .npmrc

//npm.your-ltd.org/:_authToken=xxx
# this next line is trick
//npm.your-ltd.org/:always-auth=true