skip to Main Content
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:
enter image description here

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 :
enter image description here

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


  1. 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.
    enter image description here

    enter image description here

    Step 2: Open Shell and Login to ACR as shown below.

    enter image description here

    $ docker login <acr-name>.azurecr.io --username <username> --password <password>
    

    Step 3: As an example, I am pushing Hello-World image to ACR as below.

    a.  Pull the image to local machine.
    $docker pull <image-name>:<tag>
    b.  Tag the image with ACR login server.
    $docker tag <image-name>:<tag> <acr-name>.azurecr.io/<image-name>:<latest>
    c.  Push the image to ACR
    $ docker push <acr-name>.azurecr.io/<image-name>:<latest>
    

    enter image description here

    Step 4: Verify the Image in ACR.
    enter image description here

    Login or Signup to reply.
  2. 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

    {
        "auths": {
        "yournamehere.azurecr.io": {}
        }
    }
    

    then run the

    az acr login
    

    and

    docker push
    

    again

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search