acr-login
acr-login copied to clipboard
Action failed to get authorization token with error: Error: code: 404, , requestid:
Hi,I use the following config to login ACR:
- name: Login to ACR with the AccessKey pair
uses: aliyun/acr-login@v1
with:
region-id: "cn-hangzhou"
access-key-id: "${{ secrets.ACK_ACCESS_KEY_ID }}"
access-key-secret: "${{ secrets.ACK_ACCESS_KEY_SECRET }}"
It returns the following error:
Is there something I missed?
I read the login.js, it seems that this action try to get tokens from https://cr.${regionId}.aliyuncs.com. So I test the network form runner to cr.cn-zhangjiakou.aliyuncs.com, it's OK.
I faced a similar issue when trying to login to an enterprise registry of our own, and the solution was to supply both login-server
, instance-id
and region-id
of the registery as parameters to the action.
Thanks, I work through this issue by specify the login-server
, username
, password
and region_id
. @sganslandt