nsc cache sccache create-token generates a revocable token scoped to
accessing Namespace’s remote cache for sccache.
It’s useful for provisioning access outside of the interactive
nsc cache sccache setup flow — for
example, distributing a scoped credential to a CI/CD pipeline or another
environment that shouldn’t share your personal login session.
The generated token can be written to a file and used wherever a bearer
token is accepted for sccache authentication, or revoked at any time with
nsc token revoke.
Usage
Example
Create a token scoped to a specific cache with a 10-day expiration:Options
—cache_name
Select a sccache cache to grant access to. By default, all sccache caches can be accessed.—expires_in
Duration until the token expires. Defaults to2160h (90 days). Available
time units are: h (hours), d (days), w (weeks), and y (years).
—scope
Set the scope of the generated access token. Valid options:tenant,
user. Defaults to user. Tokens with user scope are bound to the
tenant membership of the current user.
—token
Write the token to this file in JSON format. Defaults totoken.json.
Related Topics
- nsc cache sccache setup - Configure sccache to use Namespace’s remote cache
- nsc token create - Create a general-purpose revocable token with custom grants
- nsc token revoke - Revoke a token