azure-cli: az acr login failed
@djyou The login command failed in cmd:
> az acr login
Incorrect function.
Here is the configuration of default values:
> az configure
Welcome to the Azure CLI! This command will guide you through logging in and setting some default values.
Your settings can be found at C:\Users\shizh\.azure\config
Your current configuration is as follows:
[cloud]
name = AzureCloud
[core]
first_run = yes
[defaults]
group = shizhacrg
acr = shizhacr
Other commands seem working properly:
> az acr list
[
{
"adminUserEnabled": false,
"creationDate": "2017-10-18T09:16:15.114582+00:00",
"id": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/shizhacrg/providers/Microsoft.ContainerRegistry/registries/shizhacr",
"location": "eastus",
"loginServer": "shizhacr.azurecr.io",
"name": "shizhacr",
"provisioningState": "Succeeded",
"resourceGroup": "shizhacrg",
"sku": {
"name": "Managed_Standard",
"tier": "Managed"
},
"storageAccount": null,
"tags": {},
"type": "Microsoft.ContainerRegistry/registries"
}
]
> az acr show
{
"adminUserEnabled": false,
"creationDate": "2017-10-18T09:16:15.114582+00:00",
"id": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/shizhacrg/providers/Microsoft.ContainerRegistry/registries/shizhacr",
"location": "eastus",
"loginServer": "shizhacr.azurecr.io",
"name": "shizhacr",
"provisioningState": "Succeeded",
"resourceGroup": "shizhacrg",
"sku": {
"name": "Managed_Standard",
"tier": "Managed"
},
"storageAccount": null,
"tags": {},
"type": "Microsoft.ContainerRegistry/registries"
}
> az acr show-usage
{
"value": [
{
"currentValue": 0,
"limit": 107374182400,
"name": "Size",
"unit": "Bytes"
},
{
"currentValue": 0,
"limit": 10,
"name": "Webhooks",
"unit": "Count"
}
]
}
> az acr repository list
[]
After enabling Admin user:
> docker login shizhacr.azurecr.io
Username (shizhacr): shizhacr
Password:
Login Succeeded
but still
> az acr login
Incorrect function.
Environment summary
Install Method (e.g. pip, interactive script, apt-get, Docker, MSI, edge build) / CLI version (az --version
) / OS version / Shell Type (e.g. bash, cmd.exe, Bash on Windows)
> az --version
azure-cli (2.0.19)
acr (2.0.13)
acs (2.0.17)
appservice (0.1.18)
backup (1.0.1)
batch (3.1.5)
batchai (0.1.1)
billing (0.1.5)
cdn (0.0.9)
cloud (2.0.8)
cognitiveservices (0.1.8)
command-modules-nspkg (2.0.1)
component (2.0.7)
configure (2.0.11)
consumption (0.1.5)
container (0.1.11)
core (2.0.18)
cosmosdb (0.1.13)
dla (0.0.12)
dls (0.0.15)
eventgrid (0.1.4)
extension (0.0.4)
feedback (2.0.6)
find (0.2.7)
interactive (0.3.10)
iot (0.1.12)
keyvault (2.0.12)
lab (0.0.11)
monitor (0.0.10)
network (2.0.16)
nspkg (3.0.1)
profile (2.0.14)
rdbms (0.0.7)
redis (0.2.9)
resource (2.0.16)
role (2.0.13)
servicefabric (0.0.4)
sql (2.0.13)
storage (2.0.17)
vm (2.0.16)
Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\shizh\.azure\cliextensions'
Python (Windows) 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)]
Legal docs and information: aka.ms/AzureCliLegal
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 3
- Comments: 19 (7 by maintainers)
PowerShell console works for me too. I was getting this error with ConEmu, thanks @cjeffers !
executing in a regular powershell console (not ConEmu) worked for me
@derdanu @ddjyou
--name
is omitted in the above log. Actually, I use defaults (seeaz configure
). I triedaz acr login
today again with the original CMD and PowerShell terminal, and it works. Therefore, I think there is something wrong with CMD and PowerShell running within the ConEmu software:Since it works with the original CMD and PowerShell terminal, this issue can be closed now.
BTW, it is always good to show the system info for debugging purpose. Here is the system information with some identification information removed:
In another window I see “Incorrect function” instead says: