setup-node: `scope` `registry-url` with `yarn` does not work

Description: image image When I want to use GitHub action to install GitHub private package, I always prompt 401 Unauthorized

Action version: actions/setup-node@v3

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version: The node 16.x version with corresponding npm version you get in Github. node-version: 16

Repro steps:

uses: actions/setup-node@v3
with:
  node-version: 16
  cache: "yarn"
  always-auth: true
  registry-url: https://npm.pkg.github.com
  scope: "@abnerwei"

- run:  yarn --verbose
  env:
    NODE_AUTH_TOEKN: ${{ secrets.NPM_TOKEN }}
        

Expected behavior: Install private package normally.

Actual behavior: See repro steps above.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 19 (9 by maintainers)

Most upvoted comments

Hello @ildella, i am closing the issue with the documentation change

Please feel free to reopen the issue or create another one in case if the issue still exists