skopeo: Authenticating with Azure via az acr login seems broken?
I executed:
az acr login
skopeo copy docker://xyz.azurecr.io/... docker://xyz.azurecr.io/...
and I expected Skopeo to successfully copy from the source to the destination. Instead I got this output:
Getting image source signatures
FATA[0001] trying to reuse blob sha256:339de151aab4bc06eed8409daae147c408478cb538dacb90cc63f19ad4eba80b at destination: unable to retrieve auth token: invalid username/password: unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information.
The only way I can seem to get skopeo to use credentials with Azure is:
az acr login -n xyz --expose-token \
| jq -r '.accessToken' \
| skopeo login haildev.azurecr.io \
--username 00000000-0000-0000-0000-000000000000 \
--password-stdin
skopeo copy docker://xyz.azurecr.io/... docker://xyz.azurecr.io/...
Is this the expected behavior?
I’m on Mac OS X 11.6
(base) # skopeo --version
skopeo version 1.5.1
(base) # az --version
azure-cli 2.30.0 *
core 2.30.0 *
telemetry 1.0.6
Python location '/usr/local/Cellar/azure-cli/2.30.0_1/libexec/bin/python'
Extensions directory '/Users/dking/.azure/cliextensions'
Python (Darwin) 3.10.0 (default, Oct 13 2021, 06:45:00) [Clang 13.0.0 (clang-1300.0.29.3)]
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 4
- Comments: 24 (1 by maintainers)
Hello, I Have the same issue with Azure ACR credentials but only when using tokens to connect instead of accessKey(user+password). I tried:
For me the issue is not in the tokenName+Secret because I am able to user them in docker and it works
When I add debug info in the src code, the error message of Azure registry is:
The only difference i noted with legitimate call is the content of the Bearer Token which has no Role in the the invalid call
Hope it will help