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

v25.5.0 failed to publish to npm #1600

Closed
stevenpetryk opened this issue May 5, 2020 · 19 comments
Closed

v25.5.0 failed to publish to npm #1600

stevenpetryk opened this issue May 5, 2020 · 19 comments
Labels

Comments

@stevenpetryk
Copy link

stevenpetryk commented May 5, 2020

Looking at the publish_to_npm action for the commit that should've published 25.5.0, it failed.

npm ERR! This operation requires a one-time password from your authenticator.
npm ERR! You can provide a one-time password by passing --otp=<code> to the command you ran.
npm ERR! If you already provided a one-time password then it is likely that you either typoed
npm ERR! it, or it timed out. Please try again.

Did you recently add 2FA to your NPM account?

See PR #1598

@stevenpetryk stevenpetryk added Bug Report Needs Repo Need a minimium repository to reproduce the problem Needs Triage labels May 5, 2020
@ahnpnl
Copy link
Collaborator

ahnpnl commented May 6, 2020

Yes my account was added 2FA indeed.

@kulshekhar should I remove 2FA or what should we do ?

@kulshekhar
Copy link
Owner

I haven't been able to find a workaround for this and I'm hesitant to remove 2FA. We'll have to publish this manually I guess.

@ahnpnl if you don't get a chance to publish this manually, I'll do that by eod

@ahnpnl
Copy link
Collaborator

ahnpnl commented May 6, 2020

ok I will just keep the 2FA and manually publish 👍

@ahnpnl ahnpnl added Internal and removed Bug Report Needs Repo Need a minimium repository to reproduce the problem Needs Triage labels May 6, 2020
@ahnpnl
Copy link
Collaborator

ahnpnl commented May 6, 2020

tag @anshulguleria the GitHub workflow doesn't work with 2FA

@anshulguleria
Copy link
Contributor

anshulguleria commented May 6, 2020

Found out that this is still an open issue.

Does creating another npm account to publish sounds reasonable approach?

Discussion here: nodejs/package-maintenance#244 (comment)

Let me know your thoughts and in the mean time I will look into more options.

@ahnpnl
Copy link
Collaborator

ahnpnl commented May 6, 2020

It’s up to @kulshekhar to decide :)

Side question, I see the tar file in release page contains lots of unnecessary things. Its content isn’t the same as running npm pack locally. Is there a way we can improve that ?

@kulshekhar
Copy link
Owner

I've created a new user on npm: https://www.npmjs.com/~tsjest
The user does not have 2fa enabled. I've created a token for that user and have added it as the NPM_TOKEN secret var on Github.

Is there a way to re-run an action?

@ahnpnl
Copy link
Collaborator

ahnpnl commented May 6, 2020

It is possible to run by going to Actions tab. But I already manually published so I suggest we test the action with v26

image

@anshulguleria
Copy link
Contributor

You can also test with some patch release incase there is something planned.

@ahnpnl
Copy link
Collaborator

ahnpnl commented May 6, 2020

haha yes there will be a 25.5.1 soon :) Vue community is most likely broken with 25.5.0

@ahnpnl
Copy link
Collaborator

ahnpnl commented May 9, 2020

@kulshekhar
Copy link
Owner

i've disabled the requirement to have 2fa for publishing and have restarted the above job. Let's see if that works

@ahnpnl
Copy link
Collaborator

ahnpnl commented May 9, 2020

it worked now !! I think the publishing somehow depends on your npm account rather than a sub account that you created for only publishing. Not sure if we can have a workaround for that.

@kulshekhar
Copy link
Owner

it wasn't my account. The settings for the ts-jest package required 2fa for publishing. That's what I switched off

@ahnpnl
Copy link
Collaborator

ahnpnl commented May 9, 2020

I see, if it is a setting of the package itself, it looks like not possible to include 2FA into publishing process. Any thoughts @anshulguleria ?

@anshulguleria
Copy link
Contributor

I haven't been able to look into this yet. I found few leads last time and I will follow up on them. For now I think you can disable 2FA and once we have some process we can change the setting.

@ahnpnl
Copy link
Collaborator

ahnpnl commented Oct 4, 2020

@kulshekhar seem like now it’s possible with new feature https://github.blog/changelog/2020-10-02-npm-automation-tokens/

@kulshekhar
Copy link
Owner

@ahnpnl I've replaced the token with an automation token

@kulshekhar
Copy link
Owner

I think this can be closed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants