无法在 MacOS 上运行 az acr check-health 命令
我无法使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
也根据 azure/容器注册表|微软文档。
,因此请尝试@madhuraj 评论中提供的建议。
它看起来像是一个已知问题。看看下面是否可以解决。
尝试在注册表级别启用内容信任。
或者
在 Bash 中
为单个命令启用内容信任
在 azure CLI 中
请检查 启用注册表内容信任 | Microsoft 文档 了解更多详细信息。
或者参阅 azure 容器注册表 - Stack Overflow 参考
如果问题仍然存在,请从概览刀片提出支持请求>支持 + 故障排除 > 新支持请求。
参考文献:
Microsoft Docs
According too azure/container-registry| Microsoft Docs.
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.
Or
In Bash
Enable content trust for single command
In azure CLI
Please check enable registry content trust | Microsoft Docs for further details.
Or see azure container registry - Stack Overflow reference
If the issue remains please raise a support request from overview blade > Support + troubleshooting >New Support Request.
References:
Microsoft Docs
我遇到了同样的问题,并通过以下命令修复了它(安装 notary v0.6.1)
请参阅 https://github。 com/notaryproject/notary 了解公证人是什么。
...
好吧,这个命令虽然没用(叹气
I faced the same issue and fixed it by the following command (installing notary v0.6.1)
See https://github.com/notaryproject/notary for what the notary is.
...
And well, the command was useless though (sigh
设置
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 withaz acr login
command.消息
请验证是否安装了 notary
似乎表明 notary 尚未安装。直到几年前,它还与 Docker Desktop 捆绑在一起,但现在必须单独安装。Azure CLI 似乎需要 Notary v0.6.0 并且不适用于最新版本。我在存储库中没有找到任何安装说明,但这在 Windows 上对我有用:
notary-Windows-amd64.exe
notary-Windows-amd64.exe
将notary.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:
notary-Windows-amd64.exe
notary-Windows-amd64.exe
tonotary.exe
notary.exe
in a folder which you add to thePATH
environment variable