Can't seem to use auth tokens when 2fa is enabled on publish

(William Lachance) #1

What I Wanted to Do

Tried to get my project, react-metrics-graphics, to publish to npm automatically per travis’s instructions:

What Happened Instead

It failed, asking for a 2fa code:

Reproduction Steps

  • Setup a travis repo to publish to npm using an authtoken on account with 2fa enabled on both login and publish actions.
  • Watch it fail as above

Setting 2fa to fail only on login seems to “fix” the issue.


Platform Info

(John Gee) #2

This is a known limitation. See: Publish on CI with 2fa?

(William Lachance) #3

Gotcha, thanks for the reply! It is a bit frustrating that this isn’t documented anywhere obvious.