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

[BUG] Does automation token support 'npm access set status' command? #7625

Open
2 tasks done
justuno opened this issue Jul 4, 2024 · 0 comments
Open
2 tasks done
Labels
Bug thing that needs fixing Needs Triage needs review for next steps

Comments

@justuno
Copy link

justuno commented Jul 4, 2024

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

I'm facing 403 issue when I executed 'npm access set status=public @justuno-lyd/hello_npm --userconfig .npmrc'
If I change to Publish token, no issues here.

Expected Behavior

Able to use automation token to update package access level

Steps To Reproduce

  1. echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc NPM_TOKEN is automation type
  2. execute 'npm access set status=public @justuno-lyd/hello_npm --userconfig .npmrc' facing 403 issue
  3. change NPM_TOKEN to Publish type
  4. execute 'npm access set status=public @justuno-lyd/hello_npm --userconfig .npmrc' it works

Environment

  • npm: 10.5.0
  • Node.js: v20.12.2
  • OS Name: macOS Sonoma
  • System Model Name: macbook pro
  • npm config:
; "builtin" config from /opt/homebrew/Cellar/node@20/20.12.2/lib/node_modules/npm/npmrc

prefix = "/opt/homebrew" 

; "project" config from /Users/yadong/Desktop/work/test/hello_npm/.npmrc

//registry.npmjs.org/:_authToken = (protected) 

; node bin location = /opt/homebrew/Cellar/node@20/20.12.2/bin/node
; node version = v20.12.2
; npm local prefix = /Users/yadong/Desktop/work/test/hello_npm
; npm version = 10.5.0
; cwd = /Users/yadong/Desktop/work/test/hello_npm
; HOME = /Users/yadong
; Run `npm config ls -l` to show all defaults.

; "publishConfig" from /Users/yadong/Desktop/work/test/hello_npm/package.json
; This set of config values will be used at publish-time.

access = "public"
@justuno justuno added Bug thing that needs fixing Needs Triage needs review for next steps labels Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps
2 participants
@justuno and others