# vpctl configure command

> Manage registry credentials for vpctl.

Use the `configure` command group to manage the registry credentials that vpctl uses to pull releases. vpctl stores your credentials securely in your home directory.

## configure (interactive)

Set credentials interactively. The command prompts you for your username and password:

```sh
vpctl configure
```

By default, vpctl uses `uccmpprivatecloud.azurecr.io` as the registry. To set credentials for a different registry, run `vpctl configure set <registry-url>`.

## configure get

View your current configuration:

```sh
vpctl configure get
```

## onfigure set

Set credentials non-interactively. The registry argument is positional and defaults to `uccmpprivatecloud.azurecr.io`. You can provide the password by using one of the following methods, listed from most to least secure for automation:

**`--password-stdin`** This is recommended for CI/CD. Use `--password-stdin` to read the password from standard input. This method prevents the password from appearing in your shell history or the process list:

```sh
echo "$REGISTRY_PASSWORD" | vpctl configure set <registry-url> --username "$REGISTRY_USERNAME" --password-stdin
```

Use the `VPCTL_PASSWORD` environment variable together with `VPCTL_USERNAME` to supply the credentials through environment variables when piping isn't convenient:

```sh
export VPCTL_USERNAME=<username>
export VPCTL_PASSWORD=<password>
vpctl configure set <registry-url>
```

Use **`--password`** to pass the password as a flag. This option is available only for backward compatibility and isn't recommended:

```sh
vpctl configure set <registry-url> --username <username> --password <password>
```

> **Warning:**
>
> Passing `--password` on the command line exposes the password in your shell history (such as `.bash_history` or `.zsh_history`) and in the process list (`ps aux`). `vpctl` also writes a warning to `stderr` when you use this option. For automation, use `--password-stdin` or `VPCTL_PASSWORD`. or run the interactive `vpctl configure` command instead.

You can't use `--password` and `--password-stdin` together. If you don't specify either option, `vpctl` prompts you for the password interactively. If stdin isn't a terminal and `VPCTL_PASSWORD` isn't set, the command exits with an error instead of hanging.

## configure delete

Remove stored credentials. The registry argument is positional and defaults to `uccmpprivatecloud.azurecr.io`:

```sh
vpctl configure delete <registry-url>
```
