Repository navigation
fix(clientsetup): scope the npm token to the registry URL, docker login via stdin - #474
Merged
M0Rf30 merged 2 commits intoNov 13, 2026
Conversation
…in via stdin
The npm and pnpm snippets set the registry to the full base URL but
scoped the token to //HOST/repos/NAME/ only. With the server published
under a path prefix (https://host/artifacts), npm matches credentials by
URL prefix and never sent the token. The scope is now the base URL
without its scheme, through a new {{basePath}} placeholder that the Go
renderer and web/src/lib/installCommands.ts both fill.
The docker snippet passes the token with --password-stdin instead of -p,
which docker itself warns about (process arguments).
Co-Authored-By: Claude Fable 5.2 <[email protected]>
orcamedia
force-pushed
the
fix/clientsetup-npm-scope-docker-stdin
branch
from
November 12, 2026 18:55
88df385 to
7476356
Compare
# Conflicts: # docs/getting-started/upgrading.md
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.
Two fixes to the generated client setup snippets (web connect panel, MCP
client_setup, docs).npm and pnpm: the token scope ignored a path prefix
With
BASE_URL=https://registry.example/artifacts, the snippet was:npm sends a token only to URLs under the scope it's stored for, so private installs and publishes went out unauthenticated. The scope is now the registry URL without its scheme:
//registry.example/artifacts/repos/team/:_authToken. Servers at the origin root get the same line as before. Yarn wasn't affected, because it usesnpmAuthToken.{{basePath}}, the base URL without its scheme.valuesForfills it in Go andinstallCommands.tsfills it in the web renderer.clientsetup.generated.tsis regenerated.TestNPMCredentialScopeFollowsTheRegistryURLcovers a root origin, a one-segment prefix, and a prefix with a port.docker:
--password-stdininstead of-p-pputs the token in the process arguments, and docker prints a warning for it. The snippet keeps the<TOKEN>placeholder convention the snippet tests enforce.docs/formats/docker.mdis updated to match.Not changed: NuGet
--store-password-in-clear-textA review flagged this flag. I left it, because per Microsoft's docs encrypted credentials only work on Windows, so on Linux and macOS (most CI) the command needs it. If you'd like, I can add a second NuGet variant that keeps the token out of
NuGet.Config(an environment-variable credential), or a one-line note indocs/formats/nuget.md. Tell me which you prefer.Checks
golangci-lint run ./...passes.go testpasses forinternal/{clientsetup,mcp,api,repotype}andcmd/....make generateshows no drift, andmake docs-checkpasses.vue-tsc --noEmitpasses. The web unit tests are updated; I couldn't run them locally (no bun here), so CI'swebjob is their first run.🤖 Generated with Claude Code