drone CI push to ECR failure

648 Views Asked by At

when i try pushing image using drone plugin for amazon ECR i'm getting the following message:

"no basic auth credentials"

my .drone.yml file pipline:

  publish-to-ecr:
   image: plugins/ecr
   repo: foo
   registry: xxx.dkr.ecr.us-west-1.amazonaws.com
   dockerfile: ./Dockerfile
   tags:
     - latest
   access_key: xxx
   secret_key: xxx
   region: xxx

i am using the creds for pushing my local env and it is working

1

There are 1 best solutions below

0
On

The problem was that the role I configured to the machine was not configured in the repository side as well

go to the repository, and under permissions add the role the following permissions: PutImage, CompleteLayerUpload, InitiateLayerUplaod

and it worked