I'm following this guide and when I try to import cert-manager images in my private ACR from command line I receive this error:
(InvalidParameters) Operation registries-561d08e9-81e5-11ed-baec-f834415bade1 failed. Resource /subscriptions/88ea9307-f11d-433e-88c5-7a48cbbfe2f4/resourceGroups/r0b0x/providers/Microsoft.ContainerRegistry/registries/r0b0x1 Error copying blobs. Error copying blobs. Error copying blobs. Error copying blobs. Error copying blobs.
Seems that no one has encountered this error before. Using an azure account you can regenerate the same conditions starting from scratch:
az group create --name sandbox --location eastus
az acr create --resource-group sandbox --name test
# Declare few env variables to use after
ACR=test
REGISTRY=quay.io
IMAGE=jetstack/cert-manager-controller
TAG=v1.8.0
az acr import --name $ACR --source $REGISTRY/$IMAGE:$TAG --image $IMAGE:$TAG
Do you have any suggestion?
Even if fails, the last command (import) generate something inside my private ACR. If I try to list stored repositories I can see the previously created:
az acr repository list --output table
But if I try to use the image for a deployment or I try to delete it, Azure returns always a resource not found error message. I'm getting crazy with this issue!
What I'm doing wrong?
CodePudding user response:
ACR Import needs authentication implicitly, provide username and password values as mentioned below.
Enable Admin User at Access Key level
Login ACR[destination]
az acr login -n <container registry name> --expose-token
- Commands to copy the image.
$source = “Source Container”
$imageTag=“Image”
$destination="Destination"
$username= “Src username”
$password= "passw"
az acr login -n --expose-token
az acr import --name destination --source "destination−−source"[Source](http://source.azureacr.io)./$imageTag" --username $username --password $password
Note: Need to provide the username and password values implecitly to acr import command along with image tag. Grab them from step1 screen.
CodePudding user response:
I have the same issue any thoughts?
az acr import \
--name myacr \
--resource-group container-registry\
--source quay.io/argoproj/argocd:v2.5.5 \
--force
(InvalidParameters) Operation registries-a0ce23de-8691-11ed-a865-acde48001122 failed. Resource /subscriptions/e4e37725-0039-4857-b6cc-b5bd7082773c/resourceGroups/container-registry/providers/Microsoft.ContainerRegistry/registries/myacr Failed to get manifest of quay.io/repository/argoproj/argocd:v2.5.5: Remote registry returned 401 unauthorized, Unauthorized UNAUTHORIZED {"errors":[{"code":"UNAUTHORIZED","detail":{},"message":"access to the requested resource is not authorized"}]}
Code: InvalidParameters Message: Operation registries-a0ce23de-8691-11ed-a835-acde48001122 failed. Resource /subscriptions/e4e37725-0089-4857-b6cc-b5bd7082773c/resourceGroups/container-registry/providers/Microsoft.ContainerRegistry/registries/myacr Failed to get manifest of quay.io/repository/argoproj/argocd:v2.5.5: Remote registry returned 401 unauthorized, Unauthorized UNAUTHORIZED {"errors":[{"code":"UNAUTHORIZED","detail":{},"message":"access to the requested resource is not authorized"}]}