az acr login --name <containerRegistryName>
Login Succeeded
docker login <containerRegistryName>.azurecr.io
Login Succeeded
I am the Owner of the ACR. I can list images :
az acr repository list -n <containerRegistryName>
[]
When I check IAM access for my current user:
But I still can’t push anything :
docker push <containerRegistryName>.azurecr.io/searchengine/typesense:0.24.0
The push refers to repository [<containerRegistryName>.azurecr.io/searchengine/typesense]
b8000153ea3e: Preparing
5f70bf18a086: Preparing
db4ae56f0c1b: Preparing
af7ed92504ae: Preparing
unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information.
If I run a health check :
az acr check-health -n <containerRegistryName>
Docker daemon status: available
Docker version: 'Docker version 20.10.21, build 3056208, platform linux/amd64'
This will pull the image mcr.microsoft.com/mcr/hello-world:latest. Proceed? (y/n): y
Docker pull of 'mcr.microsoft.com/mcr/hello-world:latest' : OK
Azure CLI version: 2.45.0
DNS lookup to <containerRegistryName>.azurecr.io at IP 20.43.46.69 : OK
Challenge endpoint https://<containerRegistryName>.azurecr.io/v2/ : OK
Fetch refresh token for registry '<containerRegistryName>.azurecr.io' : OK
Fetch access token for registry '<containerRegistryName>.azurecr.io' : OK
2023-03-03 08:57:51.132870 An error occurred: HELM_COMMAND_ERROR
Please verify if Helm is installed.
Please refer to https://aka.ms/acr/errors#helm_command_error for more information.
I am not sure what to do as this Azure doc does not specify anything about Helm.
What am I missing ?
EDIT
I Added the AcrPush
role :
I launched the login commands via WSL2 again, login is successfull but still unable to push
EDIT 2
I might have found the source of the issue. Even with successful logins either using az acr login
or docker login
, my docker file ~/.docker/config.json
stays empty :
cat ~/.docker/config.json
{
"auths": {
"<containerRegistryName>.azurecr.io": {}
},
"credsStore": "desktop.exe"
}
I have tried both from WSL and Powershell, it stays empty. What is the JSON modele for an Auth on ACR ?
EDIT 3
Made it worked with a sudo docker login
and a sudo docker push
. But still not with my current user even if he isin the docker group
2
Answers
I have tried to repro the same using the below steps and got positive results.
Step 1: I have an owner role at the container registry resource and I enabled Admin user like below.
Step 2: Open Shell and Login to ACR as shown below.
Step 3: As an example, I am pushing Hello-World image to ACR as below.
Step 4: Verify the Image in ACR.
I have solved this Issue. somehow in your user folder there is the .docker/config.json
in there it temporary stores the credentials. But if there is something like credstore it uses that instead.
so delete the entry that it looks like this
then run the
and
again