feat(dotfiles): add npm registry auth via mise and macOS Keychain - #2
Merged
vegardx merged 1 commit intoJun 17, 2026
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to configure npm authentication for GitHub Packages on both github.com and dnb.ghe.com by sourcing tokens dynamically from macOS Keychain via mise, and deploying an npmrc via the dotfiles Ansible role.
Changes:
- Adds a
mise[env]block that retrieves GitHub Packages tokens from macOS Keychain at shell activation time. - Introduces an npmrc under
~/.config/npm/intended to provide registry auth for two registries. - Extends the dotfiles Ansible role to create
~/.config/npmand symlink the npmrc into place.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| roles/dotfiles/tasks/main.yml | Creates ~/.config/npm and symlinks the npmrc into ~/.config/npm/npmrc. |
| roles/dotfiles/files/config/npm/npmrc | Adds npm auth token configuration for GitHub Packages registries. |
| roles/dotfiles/files/config/mise/config.toml | Adds dynamic env var lookups to read tokens from macOS Keychain. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
119
to
123
| - mise/config.toml | ||
| - npm/npmrc | ||
| - gh/config.yml | ||
| - ssl/zscaler.pem | ||
| - zed/settings.json |
Comment on lines
+1
to
+2
| //npm.pkg.github.com/:_authToken=${GITHUB_TOKEN} | ||
| //npm.pkg.dnb.ghe.com/:_authToken=${GHE_TOKEN} |
vegardx
deleted the
feat/configure-npm-for-github-packages-github-com-dnb-ghe-com
branch
July 25, 2026 16:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Configure npm to authenticate against GitHub Packages registries (github.com and dnb.ghe.com).
[env]block to mise config sourcingGITHUB_TOKENandGHE_TOKENfrom macOS Keychain at shell activation~/.config/npm/npmrcwith auth tokens for both registriesManual steps
Before running the playbook, store PATs in macOS Keychain: