Giter Club home page Giter Club logo

Comments (2)

ScottCruzen0 avatar ScottCruzen0 commented on June 7, 2024

I've been attempting to setup the same thing. I think that in your case, it seems like you don't have a /kaniko/.docker/config.json in place that contains { "credsStore": "ecr-login" }.

Once that's in place, you can try dumping the contents of /root/.ecr/log/ecr-login.log after running executor to see what docker-credential-ecr-login is doing.

    steps:
      - name: Build and Push Image to ECR with Kaniko
        run: |
          set +e
          echo '{ "credsStore": "ecr-login" }' > /kaniko/.docker/config.json

          /kaniko/executor <your kaniko args here>

          cat /root/.ecr/log/ecr-login.log

To verify that your pod has the right role you could also try:
echo -n https://your_ecr_repo | docker-credential-ecr-login
But note that this will spew an ECR token into the GH runner logs, so probably don't do this.

I get the same result error checking push permissions -- make sure you entered the correct tag name, and that you are authenticated correctly, and try again: checking push permission for "url": Post "url": EOF

I'm not sure if AWS changed something, but using executor:v1.19.2-debug has suddenly started working (and it provides a better error message). I'll go back to the latest after this build completes. In my case, part of the problem was that cross account ECR perms weren't setup correctly.

from kaniko.

pgpx avatar pgpx commented on June 7, 2024

I had to give my IAM role extra permissions to ecr:GetAuthorizationToken for resources: *, in addition to permission to push/pull to selected ECR repos (I didn't have to do that for Kaniko 1.9.1). I didn't need to define a /kaniko/.docker/config.json or set AWS_SDK_LOAD_CONFIG either.

"Statement": [
        {
            "Action": "ecr:GetAuthorizationToken",
            "Effect": "Allow",
            "Resource": "*",
            "Sid": "EcrGetAuthForKaniko"
        }
    ],

from kaniko.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.