dpsctl login#

dpsctl login Usage Guide#

Login to the DPS server and store authentication credentials.

Usage#

dpsctl login [flags]

Flags#

Includes global dpsctl options.

   --username string, -u string  The username to use to authenticate to DPS [$DPSCTL_USERNAME]
   --password-stdin              Read password from stdin (e.g. printf '%s\n' 'pass' | dpsctl login -u user --password-stdin) (default: false)
   --help, -h                    show help

Examples#

Interactive Login#

$ dpsctl login
Please enter the value for username: alice
Please enter the value for password:
{
  "status": {
    "ok": true,
    "diag_msg": "Login successful"
  }
}

Login with Password from Stdin#

$ printf '%s\n' '<password>' | dpsctl login --username alice --password-stdin
{
  "status": {
    "ok": true,
    "diag_msg": "Login successful"
  }
}

Login with Environment Variables#

$ export DPSCTL_USERNAME=alice
$ export DPSCTL_PASSWORD=<password>
$ dpsctl login
{
  "status": {
    "ok": true,
    "diag_msg": "Login successful"
  }
}

Notes#

  • Credentials are stored in ${HOME}/.dpsctl/credentials.yaml by default

  • The credentials file path can be customized with --credentials-path flag

  • A password provided with --password-stdin or DPSCTL_PASSWORD requires --username or DPSCTL_USERNAME

  • Tokens are automatically refreshed when expired

  • login uses username/password authentication. It does not use the OIDC OAuth client-credentials flow for automation accounts when DPS runs in OIDC mode.