<a id="command-juju-credentials"></a>

# `juju credentials`

> See also: [add-credential](https://documentation.ubuntu.com/juju/4.0/reference/juju-cli/list-of-juju-cli-commands/add-credential.md#command-juju-add-credential), [update-credential](https://documentation.ubuntu.com/juju/4.0/reference/juju-cli/list-of-juju-cli-commands/update-credential.md#command-juju-update-credential), [remove-credential](https://documentation.ubuntu.com/juju/4.0/reference/juju-cli/list-of-juju-cli-commands/remove-credential.md#command-juju-remove-credential), [default-credential](https://documentation.ubuntu.com/juju/4.0/reference/juju-cli/list-of-juju-cli-commands/default-credential.md#command-juju-default-credential), [autoload-credentials](https://documentation.ubuntu.com/juju/4.0/reference/juju-cli/list-of-juju-cli-commands/autoload-credentials.md#command-juju-autoload-credentials), [show-credential](https://documentation.ubuntu.com/juju/4.0/reference/juju-cli/list-of-juju-cli-commands/show-credential.md#command-juju-show-credential)

**Aliases:** list-credentials

## Summary

Lists Juju credentials for a cloud.

## Usage

```text
juju credentials [options] [<cloud name>]
```

### Options

| Flag                       | Default   | Usage                                                 |
|----------------------------|-----------|-------------------------------------------------------|
| `-B`, `--no-browser-login` | false     | Do not use web browser for authentication             |
| `-c`, `--controller`       |           | Controller to operate in                              |
| `--client`                 | false     | Client operation                                      |
| `--format`                 | tabular   | Specify output format (json|tabular|yaml)             |
| `-o`, `--output`           |           | Specify an output file                                |
| `--show-secrets`           | false     | Show secrets, applicable to yaml or json formats only |

## Examples

```none
juju credentials
juju credentials aws
juju credentials aws --client
juju credentials --format yaml --show-secrets
juju credentials --controller mycontroller
juju credentials --controller mycontroller --client
```

## Details

This command list credentials from this client and credentials
from a controller.

Locally stored credentials are client specific and
are used with `juju bootstrap`
and `juju add-model`. It’s paramount to understand that
different client devices may have different locally stored credentials
for the same user.

Remotely stored credentials or controller stored credentials are
stored on the controller.

An arbitrary credential name is used to represent credentials, which are
added either via `juju add-credential` or `juju autoload-credentials`.
Note that there can be multiple sets of credentials and, thus, multiple
names.

Actual authentication material is exposed with the `--show-secrets`
option in json or yaml formats. Secrets are not shown in tabular format.

A controller, and subsequently created models, can be created with a
different set of credentials but any action taken within the model (e.g.:
`juju deploy`; `juju add-unit`) applies the credential used
to create that model. This model credential is stored on the controller.

A credential for ‘controller’ model is determined at bootstrap time and
will be stored on the controller. It is considered to be controller default.

When adding a new model, Juju will reuse the controller default credential.
To add a model that uses a different credential, specify a  credential
from this client using the `--credential` option. See `juju help add-model`
for more information.

Credentials denoted with an asterisk `*` are currently set as the user default
for a given cloud.

Use the `--controller` option to list credentials from a controller.

Use `--client` option to list credentials known locally on this client.
