Reputation: 114
If I use POST https://registry.azurecr.io/v2/ with basic auth (username and password) provided in the below image - it is going through i mean i am able to authenticate the registry with status code 200.
But now i want to authenticate the container registry with Token (previews) see below images - username - MyToken password - password [provided in the image]. [ basic auth ]
But here i am getting error -
{
"errors": [
{
"code": "UNAUTHORIZED",
"message": "authentication required, visit https://aka.ms/acr/authorization for more information.",
"detail": null
}
]
}
can someone help me authenticating azure ECR container registry without admin access keys. I mean by user Tokens(Preview) with provided with scope map.
Upvotes: 1
Views: 2571
Reputation: 5496
We have tested this in our local environment, Below statements are based on our analysis.
In our local environment, we have created a token for ACR repository & tried accessing the repository using the HTTP post request from Postman. It got failed with an error unauthorized(irrespective of whether admin mode is enabled or disabled on ACR) as shown in the below image.
As per the current Azure documentation, accessing Azure ACR repositories by creating a token using an HTTP request is not possible.
If you want to access the ACR repository by creating a token instead of using the admin credentials you can access using either Azure CLI cmdlets or by using docker cmdlets.
Here is the sample output screenshot for reference:
Upvotes: 1