acr-login icon indicating copy to clipboard operation
acr-login copied to clipboard

Action failed to get authorization token with error: Error: code: 404, , requestid:

Open vettalwu opened this issue 2 years ago • 3 comments

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:

image

Is there something I missed?

vettalwu avatar Mar 24 '22 06:03 vettalwu

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.

image

vettalwu avatar Mar 24 '22 06:03 vettalwu

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.

sganslandt avatar Apr 02 '22 05:04 sganslandt

Thanks, I work through this issue by specify the login-server, username, password and region_id. @sganslandt

vettalwu avatar Apr 07 '22 09:04 vettalwu