Skip to content

fix(release): use GITHUB_TOKEN for GitHub Packages npm auth, drop app token#32

Merged
asachs01 merged 1 commit into
mainfrom
fix/release-npm-auth-github-token
Jul 4, 2026
Merged

fix(release): use GITHUB_TOKEN for GitHub Packages npm auth, drop app token#32
asachs01 merged 1 commit into
mainfrom
fix/release-npm-auth-github-token

Conversation

@asachs01

@asachs01 asachs01 commented Jul 4, 2026

Copy link
Copy Markdown
Member

Problem

ninjaone-mcp v2.0.0 (first real release through the a61021d pipeline) failed at Build and Push Docker Image:

npm error 403 403 Forbidden - GET https://npm.pkg.github.com/download/@wyre-technology/node-ninjaone/1.1.2/...
npm error 403 Permission installation not allowed to Read organization package

Downstream Publish to MCP Registry, Security Scan, and deploy all skipped, so v2.0.0 has a tag/GitHub release but no image and no registry entry. Run: https://github.com/wyre-technology/ninjaone-mcp/actions/runs/28712238040

Root cause

The npm registry does not accept custom GitHub App installation tokens for cross-repo package reads — the minted app token is refused even though the app has packages: read org-wide and the package is public.

The a61021d app-token approach was itself a fix for a mis-diagnosed 403: the release job's permissions: block grants contents: write + issues: write but not packages: read, so its GITHUB_TOKEN was being denied. The app-token detour never got exercised until today because every fleet release since 06-26 was a no-op (docker skipped), so the latent failure surfaced only now.

Fix

Use GITHUB_TOKEN for npm auth everywhere in mcp-server-release.yml, matching the canonical pattern mcp-assert.yml already uses:

  • release job: add packages: read to permissions; npm ci with NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}; drop the app-token mint step.
  • docker job: build the npmrc secret and NODE_AUTH_TOKEN/GITHUB_TOKEN build-args from secrets.GITHUB_TOKEN (the job already has packages: write for the ghcr push); drop the app-token mint step.

Evidence the fix works

mcp-assert.yml uses exactly this pattern (permissions: packages: read + NODE_AUTH_TOKEN: secrets.GITHUB_TOKEN) and successfully installed @wyre-technology/node-ninjaone@2.0.0 cross-repo today on ninjaone-mcp#57 — a version published minutes earlier, so it was a genuine registry download, not a cache hit.

Follow-ups after merge

  • Every *-mcp repo pins the reusable by SHA (@a61021de) and needs a re-pin to this commit before its next real release. I'll start with ninjaone-mcp (blocked release) — the rest of the fleet can follow.
  • Caveat documented in-file: this relies on the SDK packages being public. A private SDK package would need a "Manage Actions access" grant for each consuming repo.

… token

The npm registry rejects custom GitHub App installation tokens for
cross-repo package reads (403 "Permission installation not allowed to
Read organization package") — proven live by ninjaone-mcp v2.0.0's
failed Docker build, the first release to exercise the app-token path
since a61021d introduced it.

The 403 that motivated the app token was actually the release job's
GITHUB_TOKEN missing `packages: read` in its permissions block. Fix
that permission and use GITHUB_TOKEN for npm auth in both the release
job and the Docker build npmrc/build-args — the same canonical pattern
mcp-assert.yml already uses, which downloads @wyre-technology/* SDKs
cross-repo successfully (verified today with a fresh, uncached
package version).

Constraint documented in-file: this works because the SDK packages are
public; a private SDK package would additionally need to grant the
consuming repo access under "Manage Actions access".
@asachs01 asachs01 merged commit a925b43 into main Jul 4, 2026
1 check passed
asachs01 added a commit to wyre-technology/ninjaone-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which failed the
v2.0.0 Docker image build. The fixed reusable uses GITHUB_TOKEN
(+ packages: read) like mcp-assert always has.
asachs01 added a commit to wyre-technology/ninjaone-mcp that referenced this pull request Jul 4, 2026
Picks up the SDK major that removed the silent boardId=1 fallback in
TicketsResource.list() (wyre-technology/node-ninjaone#49, the root-cause
fix behind #54). No code changes needed: ninjaone_tickets_list already
requires board_id and always passes it.

Also re-pins the release reusable to wyre-technology/.github#32: the npm
registry rejects custom App installation tokens for cross-repo package
reads, which failed the v2.0.0 Docker image build. The fixed reusable
authenticates npm with GITHUB_TOKEN + packages: read, so this release
ships the image, MCP Registry publish, and deploy that v2.0.0 skipped.
asachs01 added a commit to wyre-technology/abnormal-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/abnormal-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/action1-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/action1-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/afkbot-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/afkbot-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/alternative-payments-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/alternative-payments-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/atera-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/atera-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/autotask-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/autotask-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/auvik-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/auvik-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/avanan-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/kaseya-bms-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/kaseya-quote-manager-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/kaseya-quote-manager-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/kaseya-vsa-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/kaseya-vsa-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/knowbe4-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/knowbe4-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/liongard-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/liongard-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/mimecast-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
asachs01 added a commit to wyre-technology/mimecast-mcp that referenced this pull request Jul 4, 2026
wyre-technology/.github#32: the npm registry rejects custom App
installation tokens for cross-repo package reads, which fails the
Docker image build on the next real release (first seen on
ninjaone-mcp v2.0.0). See wyre-technology/.github#33.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant