bitovi/github-actions-deploy-eks-helm

Unauthorised 401 - with helm chart located on ECR

Closed this issue · 2 comments

Whenever I run the GitHub actions flow, I get this error,

Error: unexpected status from HEAD request to https://.dkr.ecr..amazonaws.com/v2/cloud-services/manifests/0.1.0: 401
Unauthorized
I have done the same steps using the same IAM role, and it worked perfectly on my local machine.

That's my workflow, I first start by log-in to the ECR, then deploy to EKS

  • name: Login to Amazon ECR
    id: login-ecr
    uses: aws-actions/amazon-ecr-login@v2

  • name: Deploy Helm
    uses: bitovi/github-actions-deploy-eks-helm@v1.2.8
    with:
    aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
    aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
    aws-region: ${{ secrets.AWS_REGION }}
    cluster-name: ${{ env.EKS_CLUSTER }}
    config-files: ./test.yml
    chart-path: test-services
    namespace: default
    values: image.tag=${{ env.IMAGE_TAG }}
    name: test
    chart-repository: oci://******.dkr.ecr.eu-central-1.amazonaws.com
    version: 0.1.0
    atomic: true

I have tried to log in to the helm registry the following way, but I keep getting the same error,

  • name: Login To Helm Registry
    # run: aws ecr get-login-password --region ${{ secrets.AWS_REGION }} | helm registry login --username AWS --password-stdin *****.dkr.ecr.eu-central-1.amazonaws.com

Any idea what I am missing here?

Hi there @abdmabrouk ! Thanks for opening an issue!

Have you checked that the aws guide says that you should configure your aws credentials first?

Let us know if that solves it, if not, might want to output the password and add is as an input into our action. There are some examples on how to do so in the aws documentation.

Let us know how it goes!

Leo

Closing issue due to inactivity. Feel free to open up another one if still looking for help.