-
Notifications
You must be signed in to change notification settings - Fork 137
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
NPM_TOKEN
for node-core-utils
to auto publish to npm
#618
Comments
This would be a change in policy:
|
Nice catch, although I don't interpret that item as "don't use tokens with this user", but rather "you shouldn't login into this user to publish the module manually" (and I'm pretty sure we've done that with some modules anyway). Either way, we can change our policy or create a new user for each module (saving the credentials on 1password/lastpass), which is a pain but would prevent the "token can publish any module" security concern. |
I'm 👍 on this, and would also happily 👍 something that clarified the policy. |
It was the ""you shouldn't login into this user to publish the module manually" part that was intended. I think for auto publishing this makes sense, and I don't see why we'd create another user. I'm +1 to this as well. |
Don't we do that sort of thing with the secrets repo using dotgpg? |
Yes but that also makes it harder of us to manage access to secrets, which is why I also opened nodejs/build#2647. |
+1 |
@mmarchini do you want to get together to create the required token. I can access the nodejs-foundation account but would like to do it together so that we create what you need (which I'm not 100% sure I'd get right on my own). |
|
@targos ok, done but not sure that will be enough since 2FA is enabled. |
It should be fine. Automation tokens bypass 2FA. Thank you! |
Looks like you were right: https://github.com/nodejs/node-core-utils/runs/5885136215?check_suite_focus=true I don't know what's blocking it, though. I have setup automation tokens without issues before (on an account that has 2FA enabled too). |
I checked on https://www.npmjs.com/package/node-core-utils/access and the package doesn't enforce 2FA so I really don't know what's wrong. |
@mhdawson are you sure that you didn't create a publish token instead of an automation token? |
@targos I thought I followed your instructions above exactly. What would be the difference between the two (ie what did I miss in the instructions above that would result in a publish instead of automation token). Once I understand that I can try again. |
See https://github.blog/changelog/2020-10-02-npm-automation-tokens/ An automation token will bypass the 2FA when publishing, while the publish token will not: |
@aduh95 k thanks, updated and I should have it correct this time. |
It worked this time: https://github.com/nodejs/node-core-utils/runs/6081510688?check_suite_focus=true |
Request to create a
NPM_TOKEN
onnode-core-utils
containing an npm automation token for the nodejs-foundation npm user so that we can automate releases for node-core-utils.Requires 2 approvals from @nodejs/tsc and 2 approvals from @nodejs/community-committee.
The text was updated successfully, but these errors were encountered: