I am trying to run a build for a Node.js project using GitHub Actions. As part of the npm install, I need to install an npm module directly from a private GitHub repository (not from GPR!).
In the package.json I have:
"dependencies": {
  ...
  "my-module": "github:<org>/<my-module>#master",
  ...
},
However, when running npm install, I get:
npm ERR! git@github.com: Permission denied (publickey). npm ERR! fatal: Could not read from remote repository.
The repository is part of my own organization, and locally (i.e. from my machine) it works. How can I make this run?
I have already tried setting the NODE_AUTH_TOKEN environment variable, but it didn't make a difference. Although you find this suggestion quite often, it seems to only address GPR. What I would like to avoid is having to hardcode the token into the package.json file. Any thoughts on this?
 
     
    

 
     
    