Reputation: 43
In my node project I would like to use both NPM and Github registries. The reason is that I use some packages as request
or async
, but I've made my own packages which are stored on Github Packges Registry.
I've tried to add @USERNAME:registry=https://npm.pkg.github.com/
in .npmrc, but I still need an authtoken. There is the problem: as it's for a continuous integration I don't want to use a token linked to a specific user.
So what could I do ?
Edit: I'm using Circle CI for my workflows.
Upvotes: 3
Views: 1430
Reputation: 42160
You can use the default GITHUB_TOKEN
associated with the repository that your workflow runs in.
If you are using a GitHub Actions workflow, you can use a GITHUB_TOKEN to publish and consume packages in the GitHub Package Registry without needing to store and manage a personal access token.
If you are not using GitHub Actions and running your build in a different CI tool then I don't think you have any choice but to use a Personal Access Token tied to a user account.
Upvotes: 1