无法在 MacOS 上运行 az acr check-health 命令

发布于 2025-01-09 10:15:46 字数 1028 浏览 2 评论 0原文

我无法使用 Azure CLI 运行运行状况检查。我使用的是 MacOS 蒙特利。以下是错误:

➜ az acr check-health -n <ACR_NAME>
Docker daemon status: available
Docker version: 'Docker version 20.10.12, build 459d0df, 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.33.1
DNS lookup to <ACR_NAME>.azurecr.io at IP 20.42.66.2 : OK
Challenge endpoint https://<ACR_NAME>.azurecr.io/v2/ : OK
Fetch refresh token for registry '<ACR_NAME>.azurecr.io' : OK
Fetch access token for registry '<ACR_NAME>.azurecr.io' : OK
Helm version: 3.8.0
An error occurred: NOTARY_COMMAND_ERROR
Please verify if notary is installed.

Please refer to https://aka.ms/acr/errors#notary_command_error for more information.

提供的支持 URL 不会导致任何有用的地方。

不确定它是否有帮助,但我可以正常登录我的 ACR:

➜ az acr login --name <ACR_NAME>
Login Succeeded

还有其他人遇到此错误/问题吗?我在这里缺少什么?

I am unable to run a health check using the Azure CLI. I am on MacOS Monterey. Below is the error:

➜ az acr check-health -n <ACR_NAME>
Docker daemon status: available
Docker version: 'Docker version 20.10.12, build 459d0df, 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.33.1
DNS lookup to <ACR_NAME>.azurecr.io at IP 20.42.66.2 : OK
Challenge endpoint https://<ACR_NAME>.azurecr.io/v2/ : OK
Fetch refresh token for registry '<ACR_NAME>.azurecr.io' : OK
Fetch access token for registry '<ACR_NAME>.azurecr.io' : OK
Helm version: 3.8.0
An error occurred: NOTARY_COMMAND_ERROR
Please verify if notary is installed.

Please refer to https://aka.ms/acr/errors#notary_command_error for more information.

The support URL provided does not lead to anywhere useful.

Not sure if it helps, but I'm able to login to my ACR just fine:

➜ az acr login --name <ACR_NAME>
Login Succeeded

Has anyone else faced this error/issue? What am I missing here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

一绘本一梦想 2025-01-16 10:15:46

也根据 azure/容器注册表|微软文档

Azure 容器注册表不正式支持 Notary CLI
但与公证服务器 API 兼容,该 API 包含在
Docker 桌面。目前推荐使用Notary 0.6.0版本

,因此请尝试@madhuraj 评论中提供的建议。

它看起来像是一个已知问题。看看下面是否可以解决。

尝试在注册表级别启用内容信任。

输入图片此处描述

或者
在 Bash 中

export DOCKER_CONTENT_TRUST=1

为单个命令启用内容信任

docker build --disable-content-trust=false -t myacr.azurecr.io/myimage:v1 .

在 azure CLI 中

$ docker push myregistry.azurecr.io/myimage:v1

请检查 启用注册表内容信任 | Microsoft 文档 了解更多详细信息。

$ docker pull myregistry.azurecr.io/myimage:signed

或者参阅 azure 容器注册表 - Stack Overflow 参考

set DOCKER_CONTENT_TRUST=1

docker push myregistry.azurecr.io/image:tag

如果问题仍然存在,请从概览刀片提出支持请求>支持 + 故障排除 > 新支持请求。

参考文献:

  1. https://docker-docs-notary
  2. 注册表身份验证选项 - Azure 容器注册表 |
    Microsoft Docs
  3. 幕后花絮 - Azure 容器注册表 |微软文档

According too azure/container-registry| Microsoft Docs.

Azure Container Registry does not officially support the Notary CLI
but is compatible with the Notary Server API, which is included with
Docker Desktop. Currently Notary version 0.6.0 is recommended

So please try the suggestion provided in comment by @madhuraj.

It looks like a known issue .See if below can be workaround.

Try to enable content trust at the registry level.

enter image description here

Or
In Bash

export DOCKER_CONTENT_TRUST=1

Enable content trust for single command

docker build --disable-content-trust=false -t myacr.azurecr.io/myimage:v1 .

In azure CLI

$ docker push myregistry.azurecr.io/myimage:v1

Please check enable registry content trust | Microsoft Docs for further details.

$ docker pull myregistry.azurecr.io/myimage:signed

Or see azure container registry - Stack Overflow reference

set DOCKER_CONTENT_TRUST=1

docker push myregistry.azurecr.io/image:tag

If the issue remains please raise a support request from overview blade > Support + troubleshooting >New Support Request.

References:

  1. https://docker-docs-notary
  2. Registry authentication options - Azure Container Registry |
    Microsoft Docs
  3. behind-the-scenes - Azure Container Registry | Microsoft Docs
撩发小公举 2025-01-16 10:15:46

我遇到了同样的问题,并通过以下命令修复了它(安装 notary v0.6.1)

$ go install github.com/notaryproject/notary/cmd/[email protected]

请参阅 https://github。 com/notaryproject/notary 了解公证人是什么。

...

好吧,这个命令虽然没用(叹气

I faced the same issue and fixed it by the following command (installing notary v0.6.1)

$ go install github.com/notaryproject/notary/cmd/[email protected]

See https://github.com/notaryproject/notary for what the notary is.

...

And well, the command was useless though (sigh

猫七 2025-01-16 10:15:46

设置 AZURE_CLI_DISABLE_CONNECTION_VERIFICATION=1 ,瞧,使用 az acr login 命令时,您不会收到 NOTARY_COMMAND_ERROR。

set AZURE_CLI_DISABLE_CONNECTION_VERIFICATION=1 and voila, you won't get NOTARY_COMMAND_ERROR with az acr login command.

蓝海似她心 2025-01-16 10:15:46

消息请验证是否安装了 notary 似乎表明 notary 尚未安装。直到几年前,它还与 Docker Desktop 捆绑在一起,但现在必须单独安装。

Azure CLI 似乎需要 Notary v0.6.0 并且不适用于最新版本。我在存储库中没有找到任何安装说明,但这在 Windows 上对我有用:

  • 下载 notary-Windows-amd64.exe
  • 重命名 notary-Windows-amd64.exenotary.exe
  • notary.exe 放入添加到 PATH 环境变量的文件夹中
  • 打开一个新终端并尝试运行状况检查再次验证它是否有效

The message Please verify if notary is installed seems to indicate that notary is just not installed. It used to be bundled with Docker Desktop until a few years ago but now has to be installed separately.

Azure CLI seems to require Notary v0.6.0 and does not work with the latest version. I didn't find any install instruction in the repository, but this worked for me on Windows:

  • Download notary-Windows-amd64.exe
  • Rename notary-Windows-amd64.exe to notary.exe
  • Place notary.exein a folder which you add to the PATH environment variable
  • Open a new terminal and try the health-check again to verify that it works
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文