rspm create token#
Advanced
Command to create tokens. The token will be written to stdout. Informational messages are written to stderr
Examples#
rspm create token --scope=sources:write --sources=* --description="Allows all sources"
rspm create token --scope=sources:write --sources=source1,source2 --expires=20d --description="20 day token"
rspm create token --scope=sources:write --sources=source1,source2 --expires=5h --description="5 hour token"
rspm create token --scope=sources:write --sources=source1,source2 --expires=never --description="token that never expires" --quiet
rspm create token --scope=blocklist:admin --expires=20d --description="20 day blocklist token"
rspm create token --scope=global:admin --expires=never --description="Allows global admin access"
# blocklist read-only token
rspm create token --scope=blocklist:read --expires=1d --description="1 day blocklist read-only token"
# escape special character to prevent bash interpretation
rspm create token --scope=sources:write --sources='*' --description="Allows all sources"
Options#
--description string The description for this token. Required.
--expires string The expiry for the token. Provide a value that specifies units in 's', 'm', 'h', or 'd'. A value of 'never' creates a token that never expires. Defaults to 'never' (default "never")
-h, --help help for token
-q, --quiet Output the token only.
--scope string Specify the token type and access. Options are: 'sources:write', 'blocklist:admin', 'blocklist:read', 'global:admin'
--sources strings For sources tokens, a comma-separated list of source names to which this token will be granted access. Only works for Git and Local sources. Use '*' to allow all sources.
Options inherited from parent commands#
-a, --address string The address of the remote server. If not specified, the PACKAGEMANAGER_ADDRESS environment variable is used.
-c, --config string Path to config file
--insecure-ssl-skip-verify If true, skip SSL certificate validation. This reduces the security that SSL normally provides.
-o, --output-format string Specify the output format 'human' for human-readable output or 'json' for JSON-encoded output. (default "human")
-v, --verbose Provide additional output