i am having similar issue.
we also have a registry with ip whitelist and i am unable to run the acr run
command
i tried with --auth-mode None
and also made sure that trusted services are allowed, but to no avail (also client IP keeps changing) :(
> az acr run --registry my-registry --cmd "acr purge --dry-run --untagged --ago 7d --keep 3 --filter \"my-image:.*\"" /dev/null
Queued a run with ID: cb11
Waiting for an agent...
2022/02/01 12:28:40 Alias support enabled for version >= 1.1.0, please see https://aka.ms/acr/tasks/task-aliases for more information.
2022/02/01 12:28:40 Creating Docker network: acb_default_network, driver: 'bridge'
2022/02/01 12:28:40 Successfully set up Docker network: acb_default_network
2022/02/01 12:28:40 Setting up Docker configuration...
2022/02/01 12:28:40 Successfully set up Docker configuration
2022/02/01 12:28:40 Logging in to registry: my-registry.azurecr.io
failed to login, ran out of retries: failed to set docker credentials: Error response from daemon: Get "https://my-registry.azurecr.io/v2/": denied: client with IP '52.178.20.38' is not allowed access. Refer https://aka.ms/acr/firewall to grant access.
: exit status 1
> az acr run --auth-mode None --registry my-registry --cmd "acr purge --dry-run --untagged --ago 7d --keep 3 --filter \"my-image:.*\"" /dev/null
Queued a run with ID: cb12
Waiting for an agent...
2022/02/01 12:29:03 Alias support enabled for version >= 1.1.0, please see https://aka.ms/acr/tasks/task-aliases for more information.
2022/02/01 12:29:03 Creating Docker network: acb_default_network, driver: 'bridge'
2022/02/01 12:29:03 Successfully set up Docker network: acb_default_network
2022/02/01 12:29:03 Setting up Docker configuration...
2022/02/01 12:29:04 Successfully set up Docker configuration
2022/02/01 12:29:04 Executing step ID: acb_step_0. Timeout(sec): 600, Working directory: '', Network: 'acb_default_network'
2022/02/01 12:29:04 Launching container with name: acb_step_0
Error: unable to resolve authentication, missing identity token or password
my azure-cli:
> az --version
azure-cli 2.32.0
core 2.32.0
telemetry 1.0.6
Dependencies:
msal 1.16.0
azure-mgmt-resource 20.0.0
Python location '/nix/store/i6vabb4div9iy6lsl642d86k1q8riasn-python3-3.9.9/bin/python3.9'
Extensions directory '/home/peter/.azure/cliextensions'
Python (Linux) 3.9.9 (main, Nov 15 2021, 18:05:17)
[GCC 10.3.0]