Unable to install private GPR npm package
See original GitHub issueI’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.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Github actions: Unable to install private GPR npm package
I've been having some issues installing a scoped package that that was published to GPR. See below for my actions file
Read more >Unable to install package from private npm registry
I've created a single private project that I'm only using as a centralized, remote NPM package repository. I'm able to publish packages ok....
Read more >Host and Publish NPM package on GitHub | by Windix Feng
It supports both public and private package (based on your GitHub repo is public or private). The NPM publishing destination (rather than the...
Read more >unable to authenticate, need: basic realm="github" - You.com
You cannot install packages (even public ones) from the GitHub npm registry without being authenticated. More details and multiple authentication methods ...
Read more >Private NPM Packages using GitHub Actions & Packages
Learn how to use GitHub Packages to host your own private packages. Written Version:▫ Website: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Per @joebowbeer , would it just work if you set
NODE_AUTH_TOKEN
envvar and didn’t echo to the npmrc file?Hello everyone. Thank you for your responses. I’m going to close, because I could not reproduce it. It looks like the issue from customer’s set up. @ssylvester If you have any concerns feel free to contact us.