Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to pull private ECR repository when referenced as a dependency #62

Open
joechchung opened this issue Feb 13, 2025 · 1 comment
Open

Comments

@joechchung
Copy link

joechchung commented Feb 13, 2025

I'm trying to deploy my local Chart.yaml but it has a dependency reference to a private ECR registry:

# build/helm/Chart.yaml
apiVersion: v2
name: api
version: 1.0.0
type: application

dependencies:
  - name: <ecr name>
    version: 1.0.0
    repository: "oci://<masked>.dkr.ecr.eu-west-2.amazonaws.com"

Even though i'm assuming a role and logging into ECR:

    - name: Configure AWS Credentials
      uses: aws-actions/configure-aws-credentials@v4
      with:
        role-to-assume: <role arn>
        aws-region: eu-west-2

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

    - name: Install Helm Chart
      uses: bitovi/[email protected]
      with:
        chart-path: ./build/helm

I receive this error: pull access denied, repository does not exist or may require authorization: authorization failed: no basic auth credentials

@LeoDiazL
Copy link
Contributor

Hi @joechchung !

First of all, thanks for opening an issue!

Dealing with any kind of access is always tricky. This is a script that's running inside a Docker image, so the login is likely getting lost somewhere.

There is this section in the Amazon ECR Login action that might help you get the credentials to login to the OCI repo inside our action block? Maybe?

I think that might solve it or at least push you closer to a solution. If it does, we might want to add that as an example in the README.

Leo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants