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

Broken verify-auth implementation #414

Open
EricCrosson opened this issue Oct 24, 2021 · 1 comment · May be fixed by #416
Open

Broken verify-auth implementation #414

EricCrosson opened this issue Oct 24, 2021 · 1 comment · May be fixed by #416

Comments

@EricCrosson
Copy link

TL;DR: I receive ENEEDAUTH npm errors until I comment out these three lines in my node_modules directory -- then publication works fine.

What I did

I attempted to use multi-semantic-release to semantically-publish the typescript-tools monorepo. I configured the NPM_TOKEN environment variable with an Automation-type npm token

Both locally and in GitHub actions I invoked

npx multi-semantic-release

What I expected to happen

I expected packages to publish semantically.

What actually happened

I received the npm error

npm ERR! code ENEEDAUTH
npm ERR! need auth This command requires you to be logged in.
npm ERR! need auth You need to authorize this machine using `npm adduser`

More details

Note: I originally opened an issue in multi-semantic-release but determined the root cause did not lie with code in that repository.

I have 24 packages in the typescript-tools monorepo. While instrumenting the @semantic-release/npm code with debug statements I learned that some (but not all!) of the npm whoami calls in this try block were failing. Plenty of them succeeded in printing my npm username in my stdout.

I was sure from my debugging that the npm credentials were being configured in the temporary .npmrc file correctly, so I tried commenting out the throw statement handling the whoami errors and sure enough, I was able to publish!

[6:56:59 PM] › 🎉  Released 5 of 24 packages, semantically!

So something must be going wrong with the whoami check. I don't think it's being rate-limited; I tried making 100 parallel calls to npm whoami using the @semantic-release/npm temporary .npmrc configuration and all 100 calls succeeded.

@antongolub
Copy link
Contributor

antongolub commented Oct 27, 2021

CC @gr2m, @pvdlg

Errors may occur due to throttling on the npm side. More packages, more chance of this kind of error.

antongolub added a commit to antongolub-forks/semantic-release-npm that referenced this issue Oct 27, 2021
@antongolub antongolub linked a pull request Oct 27, 2021 that will close this issue
antongolub added a commit to antongolub-forks/semantic-release-npm that referenced this issue Oct 27, 2021
antongolub added a commit to antongolub-forks/semantic-release-npm that referenced this issue Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants