Skip to content

Unable to install private GPR npm package #114

@ssylvester

Description

@ssylvester

I've been having some issues installing a scoped package that that was published to GPR

See below for my actions file

name: run unit and coverage tests

on: [push]

jobs:
  build:

    runs-on: macos-latest

    strategy:
      matrix:
        node-version: [12.x]

    steps:
    - uses: actions/checkout@v1
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
        registry-url: 'https://npm.pkg.github.com/'
        scope: '@OWNER'
    - name: Authenticate with GitHub package registry
      run: echo "//npm.pkg.github.com:_authToken=${{ secrets.PRIVATE_ACCESS_TOKEN }}" > ~/.npmrc
    - name: npm install, build, and test
      run: |
        npm ci
        npm run test:unit
        npm run lint
        npm run test:e2e -- --headless
      env:
        CI: true

my .npmrc file is as follows:

@discoveryedu:registry=https://npm.pkg.github.com/

my private access token has read:packages, write:packages, and repo privileges.

I'm getting the following error in actions:

npm ERR! code E401
npm ERR! 401 Unauthorized - GET https://npm.pkg.github.com/download/@owner/repo/version/17acfb4437fa36d9d3a823706515a97591ef1ca93a2cc3abb943b333734672d1

i've subbed the owner, repo, and version names for privacy.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions