Skip to content

mw gitlab cluster agent token-cache

Releasev0.35.0 · cfeceb67

Manage cached GitLab Agent tokens created by ‘glab cluster agent get-token’.

This command group allows you to list and clear tokens that are cached locally in the keyring and filesystem cache.

The GitLab CLI caches agent tokens in two locations:

  1. Keyring - Uses the system keyring (Windows Credential Manager, macOS Keychain, Linux Secret Service)
  2. Filesystem - Stores tokens in the user’s cache directory as encrypted files

The cache improves performance by avoiding the need to create new tokens for each kubectl operation when using ‘glab cluster agent update-kubeconfig’.

Cached tokens are stored using a key format that includes:

  • Base64-encoded GitLab instance URL
  • Agent ID

This ensures tokens are properly isolated by GitLab instance and agent.

-h, --help
Show help for this command.
--no-interaction
Do not ask any interactive questions
--profile <string>
Saved account profile (login defaults to the verified username)
-R, --repo <OWNER/REPO>
Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
-v, --verbose <count>
Increase output verbosity. Example: --verbose=2 or -vv
Report an issue with this page

Report a documentation issue

The report includes this page’s link, section and documentation version.

Review and submit on Phabricator, or run the command using your saved CLI profile. The command asks before creating the task.