login
Command: vlt login
Use the login
command to authenticate users or machines with HCP Vault
Secrets.
The default functionality is to open a web browser and manage authentication through the user's HCP account. Alternatively, you can set the HCP service principal key pair (client ID and secret ID) as an environment variable to perform headless login.
HCP_CLIENT_ID
- set the vlue to your service principal client IDHCP_CLIENT_SECRET
- set the vlue to your service principal client secret
Examples
By default, login will launch a web browser to perform HCP login.
You may close the browser and return to the command line.
Tip
First, it looks for the credentials.json
file to see if there is cached
credentials. If not, it will launch a web browser.
Alternatively, you can preset the client ID and client secret environment variables.
And the, run the login
command.