You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Need a prompt to be able to pass this for publishing, etc (right before since not that much time)
EDIT: current workaround is NPM_CONFIG_OTP=123456 lerna publish
Reacted by Dennis Reimann, Loïc Poullain, Artem Sapegin, Marco Biedermann, Greg Ziółkowski, Billy Vong, Iván Zaera (@liferay), Stephen Edgar, Hutson Betts, Tim Neutkens and 43 more
I'm worried that we'll have to re-prompt if publishes start failing (due to expired TOTP). Really exposes how un-tested and gnarly our current publish failure handling is. :/
To help people in the short term, perhaps npm's tokens could help. Creating a wrapper script to generate a token, adding it to your .npmrc then publishing using lerna then removing and deleting the token could work.
For people finding this through Google, I'd like to point out that a good workaround is to set the NPM_CONFIG_OTP environment variable before running lerna publish, e.g.
NPM_CONFIG_OTP=123456 lerna publish
Reacted by Andrew Duthie, Adam Silverstein, Abraham Williams, Piotrek Koszuliński, edoroshenko, Sergey Ukustov, Chris Chang and Andrew C. Dvorak
On Mar 4, 2018, at 21:17, James Hegedus ***@***.***> wrote:
The above solution doesn't seem to work with Yarn & lerna as a devDep, eg:
NPM_CONFIG_OTP=123456 yarn lerna publish
It still fails on the OTP during publication 😞
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
@iarna (from the npm team) suggested running npm pack initially and then prompting for the OTP and publishing the tarballs concurrently. I think approach this has lots of promise!
As a result of the recent compromise, I'd love to be able to enforce 2FA across our org. Is there a way to do the npm pack approach with lerna now or does this need work within lerna itself?
On Mar 5, 2019, at 15:28, Richard Moore ***@***.***> wrote:
Can you point me in the right direction as to which file I need to update/patch to change the studio to "inherit"?
Thanks!! :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
@ricmoo: The actual fix is very small so I selectively copied only this part. Unfortunately, I am away from my laptop for the next 10 days so I can't send you a copy-and-paste snippet.
Activity
evocateur commentedon Oct 30, 2017
I'm worried that we'll have to re-prompt if publishes start failing (due to expired TOTP). Really exposes how un-tested and gnarly our current publish failure handling is. :/
hzoo commentedon Oct 30, 2017
Yeah that's what happened, also since we published like 100 pkgs and it would expire in between (had to just turn it off)
djfarrelly commentedon Nov 3, 2017
To help people in the short term, perhaps npm's tokens could help. Creating a wrapper script to generate a token, adding it to your
.npmrcthen publishing using lerna then removing and deleting the token could work.Docs: https://docs.npmjs.com/getting-started/working_with_tokens
Other helpful info: https://circleci.com/docs/1.0/npm-private-module-dependency/
rhysforyou commentedon Feb 11, 2018
For people finding this through Google, I'd like to point out that a good workaround is to set the
NPM_CONFIG_OTPenvironment variable before runninglerna publish, e.g.jthegedus commentedon Mar 5, 2018
The above solution doesn't seem to work with Yarn & lerna as a devDep, eg:
It still fails on the OTP during publication 😞
evocateur commentedon Mar 5, 2018
jthegedus commentedon Mar 5, 2018
Fair point. I was under the impression that Yarn read all of npm's configs, wishful thinking. A note for others nonetheless.
teppeis commentedon May 5, 2018
Yarn's issue: yarnpkg/yarn#4904
dupski commentedon May 13, 2018
+1 for lerna to prompt for this, although
NPM_CONFIG_OTPseems to work ok. Turning off 2FA doesn't seem like a good solution :)Don't use 'lerna publish' since it doesn't support 2FA (lerna/lerna#1091
evocateur commentedon Jul 4, 2018
@iarna (from the npm team) suggested running
npm packinitially and then prompting for the OTP and publishing the tarballs concurrently. I think approach this has lots of promise!rgbkrk commentedon Jul 12, 2018
As a result of the recent compromise, I'd love to be able to enforce 2FA across our org. Is there a way to do the
npm packapproach with lerna now or does this need work within lerna itself?53 remaining items
Handle publishing with OTP
ricmoo commentedon Mar 5, 2019
Can you point me in the right direction as to which file I need to update/patch to change the studio to "inherit"?
Thanks!! :)
evocateur commentedon Mar 6, 2019
ricmoo commentedon Mar 6, 2019
I see. That may explain why the export technique isn’t working for me either then?
Is there any existing work around? Even if it involves patching the bin/lerna?
ricmoo commentedon Mar 7, 2019
@imaman Can you share your technique for patching? :)
busticated commentedon Mar 7, 2019
@ricmoo implementation details aside, i've had a ton of success with: https://github.com/ds300/patch-package
imaman commentedon Mar 7, 2019
@ricmoo: there's a branch called "one-time-password-to-rule-them-all" which contains a proposed solution.
Link to the branch: https://github.com/lerna/lerna/tree/one-time-password-to-rule-them-all
ricmoo commentedon Mar 7, 2019
@busticated Oh, I meant specifically what lines and files to modify for the purpose of OTP w/ Lerna. :)
@imaman Is that safe? I checked it out the other day and it was 114 commits behind... :s (or do you mean just copy the otpplease and co?)
imaman commentedon Mar 7, 2019
@ricmoo: The actual fix is very small so I selectively copied only this part. Unfortunately, I am away from my laptop for the next 10 days so I can't send you a copy-and-paste snippet.
ricmoo commentedon Mar 7, 2019
@imaman No worries, that helps a tonne. I'll copy it over (maybe experiment with a smaller test repo first). :)
docs(contributing): document how to run lerna publish with 2fa enabled
feat(publish): Add OTP prompt during publish (#2084)
evocateur commentedon May 14, 2019
Published in v3.14.0. Used it to publish it, even. ^_^
Don't use 'lerna publish' since it doesn't support 2FA (lerna/lerna#1091