Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

az acr task credential

Manage credentials for a task. Please see https://aka.ms/acr/tasks/cross-registry-authentication for more information.

Commands

Name Description Type Status
az acr task credential add

Add a custom registry login credential to the task.

Core GA
az acr task credential list

List all the custom registry credentials for task.

Core GA
az acr task credential remove

Remove credential for a task.

Core GA
az acr task credential update

Update the registry login credential for a task.

Core GA

az acr task credential add

Add a custom registry login credential to the task.

az acr task credential add --login-server
 --name
 --registry
 [--acquire-policy-token]
 [--change-reference]
 [--password]
 [--resource-group]
 [--use-identity]
 [--username]

Examples

Add a registry login credential to a task using a plain text username and password.

az acr task credential add -n taskname -r registryname --login-server myregistry.docker.io \
 -u myusername -p mysecret

Add a registry login credential to a task using key vault secret URIs for the username and password and the task system-assigned identity.

az acr task credential add -n taskname -r registryname --login-server myregistry.docker.io \
 -u https://mykeyvault.vault.azure.net/secrets/secretusername -p https://mykeyvault.vault.azure.net/secrets/secretpassword \
 --use-identity [system]

Add a registry login credential to a task using key vault secret URIs for the username and password and a task user-assigned identity given by its client id.

az acr task credential add -n taskname -r registryname --login-server myregistry.docker.io \
 -u https://mykeyvault.vault.azure.net/secrets/secretusername -p https://mykeyvault.vault.azure.net/secrets/secretpassword \
 --use-identity 00000000-0000-0000-0000-000000000000

Add a registry login credential to a task using a plain text username and key vault secret URI for the password and the task user-assigned identity given by its client id.

az acr task credential add -n taskname -r registryname --login-server myregistry.docker.io \
 -u myusername -p https://mykeyvault.vault.azure.net/secrets/secretpassword \
 --use-identity 00000000-0000-0000-0000-000000000000

Add a registry login credential to a task using a plain text username and key vault secret URI for the password and the default managed identity for the task if one exists.

az acr task credential add -n taskname -r registryname --login-server myregistry.docker.io \
 -u myusername -p https://mykeyvault.vault.azure.net/secrets/secretpassword

Add a registry login credential to a task that uses only the task system-assigned identity to authenticate to the registry.

az acr task credential add -n taskname -r registryname --login-server myregistry.docker.io \
 --use-identity [system]

Required Parameters

--login-server

The login server of the custom registry. For instance, 'myregistry.azurecr.io'.

--name -n

The name of the task.

--registry -r

The name of the container registry. It should be specified in lower case. You can configure the default registry name using az configure --defaults acr=<registry name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--password -p

The password to login to the custom registry. This can be plain text or a key vault secret URI.

--resource-group -g

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

--use-identity

The task managed identity used for the credential. Use '[system]' to refer to the system-assigned identity or a client id to refer to a user-assigned identity. Please see https://aka.ms/acr/tasks/cross-registry-authentication for more information.

--username -u

The username to login to the custom registry. This can be plain text or a key vault secret URI.

az acr task credential list

List all the custom registry credentials for task.

az acr task credential list --name
 --registry
 [--resource-group]

Examples

List the Credentials for a task.

az acr task credential list -n taskname -r registryname

Required Parameters

--name -n

The name of the task.

--registry -r

The name of the container registry. It should be specified in lower case. You can configure the default registry name using az configure --defaults acr=<registry name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--resource-group -g

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

az acr task credential remove

Remove credential for a task.

az acr task credential remove --login-server
 --name
 --registry
 [--acquire-policy-token]
 [--change-reference]
 [--resource-group]

Examples

Remove a registry login credential from a task.

az acr task credential remove -n taskname -r registryname --login-server myregistry.docker.io

Required Parameters

--login-server

The login server of the custom registry. For instance, 'myregistry.azurecr.io'.

--name -n

The name of the task.

--registry -r

The name of the container registry. It should be specified in lower case. You can configure the default registry name using az configure --defaults acr=<registry name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--resource-group -g

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

az acr task credential update

Update the registry login credential for a task.

az acr task credential update --login-server
 --name
 --registry
 [--acquire-policy-token]
 [--change-reference]
 [--password]
 [--resource-group]
 [--use-identity]
 [--username]

Examples

Update the credential for a task

az acr task credential update -n taskname -r registryname --login-server myregistry.docker.io \
 -u myusername2 -p mysecret

Required Parameters

--login-server

The login server of the custom registry. For instance, 'myregistry.azurecr.io'.

--name -n

The name of the task.

--registry -r

The name of the container registry. It should be specified in lower case. You can configure the default registry name using az configure --defaults acr=<registry name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--password -p

The password to login to the custom registry. This can be plain text or a key vault secret URI.

--resource-group -g

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

--use-identity

The task managed identity used for the credential. Use '[system]' to refer to the system-assigned identity or a client id to refer to a user-assigned identity. Please see https://aka.ms/acr/tasks/cross-registry-authentication for more information.

--username -u

The username to login to the custom registry. This can be plain text or a key vault secret URI.


Feedback

Was this page helpful?