Using DCLI with a Credential Store File

To avoid entering the user name and password each time you run a DCLI command, you can add the current credentials or refresh token and server IP address to a credential store file by using the
credstore-add
option on the command line.
Passwords and refresh tokens are encrypted in the credential store file. If you want to remove credential store information, you can use
+credstore-remove
to do so.
By default, the credential store file is located in
$HOME/.dcli/.dcli_credstore
, but you can change the location with the
+credstore-file
option.

Examples

The following examples illustrate how you can interact with the credential store.
  • Add a new credential store entry.
    ./dcli com vmware cis tagging tag list +credstore-add +username user1
  • Remove a credential store entry.
    ./dcli +credstore-remove +server <server> +username user1
  • List all credential store entries.
    ./dcli +credstore-list