0

我正在尝试向其发送 GET 请求,https://acr-name.azurecr.io/v2/image-name/tags/list但我不确定要使用哪个令牌,因为我不断收到:

{
    "errors": [
        {
            "code": "UNAUTHORIZED",
            "message": "authentication required, visit https://aka.ms/acr/authorization for more information.",
            "detail": [
                {
                    "Type": "repository",
                    "Name": "image-name",
                    "Action": "metadata_read"
                }
            ]
        }
    ]
}

我尝试了 BasicAuth 但我仍然收到错误消息。我什至尝试了 Bearer,但它仍然无法正常工作。

我想在我的 ACR 中列出图像的所有标签。

4

1 回答 1

1

You can use the basic auth with the username and password of the ACR, the name can be the admin user and password, and also can be the service principal app Id and secret which have the right permission of the ACR. Here is the screenshot that I did the test:

enter image description here

于 2021-04-05T02:09:55.783 回答