Container Registry credentials - az acr credential

Manage login credentials for Azure container registries.

Commands

az acr credential renew Regenerates one of the login credentials for the specified container registry.
az acr credential show Gets the login credentials for the specified container registry.

az acr credential renew

Regenerates one of the login credentials for the specified container registry.

az acr credential renew --name
--password-name {password, password2}
[--resource-group]

Examples

Renew the second password for a container registry.

az acr credential renew -n MyRegistry --password-name password2

Required Parameters

--name -n

The name of the container registry. You can configure the default registry name using az configure --defaults acr=.

--password-name

The name of password to regenerate.

accepted values: password, password2

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=.

az acr credential show

Gets the login credentials for the specified container registry.

az acr credential show --name
[--resource-group]

Examples

Get the login credentials for a container registry.

az acr credential show -n MyRegistry

Get the username used to log into a container registry.

az acr credential show -n MyRegistry --query username

Get one of the passwords used to log into a container registry.

az acr credential show -n MyRegistry --query passwords[0].value

Required Parameters

--name -n

The name of the container registry. You can configure the default registry name using az configure --defaults acr=.

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=.