[英]How to authenticate with azure container registry using cert-based service principal
I'm following the below tutorial to push docker image to my ACR.我正在按照以下教程将 docker 图像推送到我的 ACR。 I'm authenticating using AAD service principal.
我正在使用 AAD 服务主体进行身份验证。 The article mentions the steps to authenticate when the AAD service principal has a password, mine has a certificate not a password.
文章提到了当 AAD 服务主体有密码时进行身份验证的步骤,我的有证书而不是密码。
article: https://docs.microsoft.com/en-us/azure/container-registry/container-registry-auth-service-principal#feedback文章: https://docs.microsoft.com/en-us/azure/container-registry/container-registry-auth-service-principal#feedback
I tried converting the cert pfx to bytes then base64 encode it and pass it as password to docker login command but that didn't work, I got authentication error.我尝试将 cert pfx 转换为字节,然后 base64 对其进行编码并将其作为密码传递给 docker 登录命令,但这不起作用,我遇到了身份验证错误。
I found the answer here: https://github.com/Azure/acr/blob/master/docs/AAD-OAuth.md The steps involve using the AAD token to get an access token from ACR, then use that one to pull/push using docker CLI我在这里找到了答案: https://github.com/Azure/acr/blob/master/docs/AAD-OAuth.md这些步骤涉及使用 AAD 令牌从 ACR 获取访问令牌,然后使用该令牌拉/push 使用 docker CLI
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.