You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Plain VLT_TOKEN is ignored unless VLT_REGISTRY is set (does not apply to the default registry alias) #1845
A token for the default registry can be provided in the VLT_TOKEN environment variable.
and the OIDC section says vlt "falls back to VLT_TOKEN". In practice VLT_TOKEN is only honored when VLT_REGISTRY is set (or a registry scalar is configured, which the config layer exports as VLT_REGISTRY). Users who followed the guided vlt setup path only get registries.npm / registries.main aliases written to their config, so for them VLT_TOKEN is silently ignored.
✅ Expected Behavior
VLT_TOKEN=<tok> vlt install authenticates requests to the default registry, i.e. the registry selected by default-registry-alias (which is what vlt setup configures), regardless of whether VLT_REGISTRY is set.
❌ Actual Behavior
With vlt.json containing only registries.npm (as written by vlt setup), VLT_TOKEN=x vlt install sends no Authorization header (reproduced against a local logging registry: auth=null). Setting VLT_REGISTRY in addition makes it work.
VLT_TOKEN is gated on a VLT_REGISTRY match only; the default-registry-alias / registries config is never considered.
Fix options
Apply VLT_TOKEN to the registry selected by default-registry-alias (and/or to the registry scalar) — preferred, matches the docs.
Or document that VLT_TOKEN requires VLT_REGISTRY (or a registry scalar) to be in effect.
Related: the per-registry VLT_TOKEN_* form is also broken at the request level (see the linked issue), so today the only env-based auth that works is VLT_REGISTRY + VLT_TOKEN, and only for a single registry.
I ran into this previously and found that jackspeak does set VLT_REGISTRY as an environment variable. So even if it's not set explicitly, it will still end up running that branch. I think this is still the case today but I haven't confirmed with any code.
Activity
ruy-bot commentedon Sep 14, 2026
Related: #1844 (
VLT_TOKEN_*per-registry form also broken at request level).lukekarrys commentedon Sep 14, 2026
I ran into this previously and found that jackspeak does set VLT_REGISTRY as an environment variable. So even if it's not set explicitly, it will still end up running that branch. I think this is still the case today but I haven't confirmed with any code.
registry-client: apply VLT_TOKEN to default registry (#1992)