Authenticate Vespa CLI with Vespa Cloud control plane. This is preferred over api-key for interactive use
Authenticate Vespa CLI with Vespa Cloud control plane. This is preferred over api-key for interactive use.
This command runs a browser-based authentication flow for the Vespa Cloud control plane.
By default, the authorization code flow with PKCE is used: a login page is opened in your browser, and the result is received by a temporary local server on 127.0.0.1, using the first available port in 24180-24184. This requires the browser to run on the same machine as Vespa CLI.
Use –device to use the device authorization flow instead. This flow prints a confirmation code and a URL that can be opened in a browser on any machine, and is useful in SSH sessions, containers and other environments where the browser cannot reach this machine.
Use –file-storage flag to store the refresh token in unencrypted files instead of the system keyring. This is useful in SSH/CI/Docker environments where keyring access may not be available.
Use –no-browser to print the login URL to standard output instead of opening a browser automatically. This is useful in non-interactive terminals (e.g. Git Bash on Windows) or remote sessions where a browser cannot be opened.
Use –batch to suppress all human-readable output and print only machine-readable key=value pairs.
This always uses the device authorization flow:
code=
vespa auth login [flags]
$ vespa auth login
--batch Print machine-readable key=value pairs (code, url) and suppress all other output
--device Use the device authorization flow instead of the default browser-based flow with a local callback server
--file-storage Use file storage (unencrypted) instead of keyring for storing refresh token
-h, --help help for login
--no-browser Print login URL to standard output without confirmation and without automatic opening of browser
-a, --application string The application to use. Format "tenant.application.instance" - instance is optional (tenant required for cloud targets)
-C, --cluster string The container cluster to use. This is only required for applications with multiple clusters
-c, --color string Whether to use colors in output. Must be "auto", "never", or "always" (default "auto")
-i, --instance string The instance of the application to use
--progress Show live deployment progress in interactive terminals (default true)
-q, --quiet Print only errors
-t, --target string The target platform to use. Must be "local", "cloud", "hosted" or an URL (default "local")
-z, --zone string The zone to use. This defaults to a dev zone (cloud only)