bolt icon indicating copy to clipboard operation
bolt copied to clipboard

Support 2fa / otp when publishing

Open jesstelford opened this issue 7 years ago • 3 comments

There's currently no way to pass a OTP password to npm when running bolt publish.

Looks like adding the tty: true option within bolt might allow entering a OTP on the cli whenever npm asks for it?

These output pipelines might also have to be disabled, otherwise the terminal may get all screwy.

jesstelford avatar Oct 16 '18 02:10 jesstelford

Ahhh I didn't see this before setting up my entire repo with bolt, but now I can't publish anything since I have 2FA enabled :cry: Any workarounds?

Probably also related to #163? That would allow one to just pass the --otp flag I think.

mxstbr avatar Oct 25 '18 12:10 mxstbr

This workaround worked! :tada: https://github.com/lerna/lerna/issues/1091

NPM_CONFIG_OTP=123456 bolt publish

mxstbr avatar Oct 25 '18 12:10 mxstbr

Nice find!

🤔 As mentioned in that thread; There's a situation where a long running publish (or prepublish) step can result in an expired OTP by the time it makes its way to npm.

jesstelford avatar Oct 25 '18 22:10 jesstelford