0

What is going on here? This should work.

$ az logout
$ az login
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code FW....C to authenticate.
[
  {
    "cloudName": "AzureCloud",
    "homeTenantId": "[redacted]",
    "id": "[redacted]",
    "isDefault": true,
    "managedByTenants": [],
    "name": "Azure subscription 1",
    "state": "Enabled",
    "tenantId": "[redacted]",
    "user": {
      "name": "[redacted]",
      "type": "user"
    }
  }
]
$ az account set -s [subscription id redacted]
$ az acr login --name arcticacr
Login Succeeded
$ docker push ArcticaCR.azurecr.io/sftp01/sftptest:0.02
The push refers to a repository [ArcticaCR.azurecr.io/sftp01/sftptest]
b152ea134f5f: Preparing 
d799cb5f12bf: Preparing 
6b4e8c931236: Preparing 
6f4c91ca60bd: Preparing 
86eecfa8066e: Preparing 
unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information.

I'm logged in as the owner of this registry (per IAM). I should be authorized to do anything. Admin user is enabled under Access keys, even though I'm not using those.

Adam Winter
  • 1,680
  • 1
  • 12
  • 26
  • While Stack Overflow does permit certain questions about Docker, we require that they (like all questions asked here) be specifically related to programming. This question does not appear to be specifically related to programming, making it off-topic here. You might be able to ask questions like this one on [sf] or [DevOps](https://devops.stackexchange.com/). – Turing85 Jul 17 '22 at 20:24
  • Pretty new over there in DevOps. I just created the "azure-container-registry" tag. – Adam Winter Jul 17 '22 at 20:28
  • @Turing85 There is nothing wrong with this question. – Daniel Mann Jul 18 '22 at 02:34

1 Answers1

1

spottedmahn had the answer for on this thread (though it's far from the top answer, while other answers are much more particular to using Azure Devops UI): Push Docker Image task to ACR fails in Azure "unauthorized: authentication required"

The image name needs to be in all lowercase. You can't just change the push command to lowercase.

$ docker build -t arcticacr.azurecr.io/sftp01/sftptest:0.02 -f Dockerfile .
$ az login
$ az account set -s [subscription id redacted]
$ az acr login --name arcticacr
$ docker push arcticacr.azurecr.io/sftp01/sftptest:0.02
Adam Winter
  • 1,680
  • 1
  • 12
  • 26