I have a GitHub account where I have projects and components. One of my projects includes a separate NPM component from the same GitHub account.
I am working on Windows with git. I have connected GitHub via SSH and I can git pull / push etc. I have also created a non-expiring personal access token in GitHub and added to local.
My .npmrc contains:
//npm.pkg.github.com/:_authToken=ghp_MY_TOKEN
@org-name:registry=https://npm.pkg.github.com/
When I run npm install I end up with:
npm ERR! code E401
npm ERR! 401 Unauthorized - GET https://npm.pkg.github.com/@org-name%2fpackage-name - Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\myuser\AppData\Roaming\npm-cache\_logs\2021-11-06T23_35_02_955Z-debug.log
What have I missed?