Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use Github Package Registry without authtoken

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.

like image 268
Fur Nocte Avatar asked Aug 08 '26 11:08

Fur Nocte


1 Answers

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.

ref: https://help.github.com/en/github/managing-packages-with-github-package-registry/configuring-npm-for-use-with-github-package-registry#authenticating-to-github-package-registry

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.

like image 196
peterevans Avatar answered Aug 11 '26 11:08

peterevans



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!