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

Dockerfile in AWS Codecommit #2282

Open
rikirolly opened this issue Oct 13, 2022 · 5 comments
Open

Dockerfile in AWS Codecommit #2282

rikirolly opened this issue Oct 13, 2022 · 5 comments
Labels
area/behavior all bugs related to kaniko behavior like running in as root area/errorhandling For all bugs having to do with handling problems during kaniko execution area/registry For all bugs having to do with pushing/pulling into registries kind/question Further information is requested priority/p2 High impact feature/bug. Will get a lot of users happy

Comments

@rikirolly
Copy link

rikirolly commented Oct 13, 2022

Does someone successfully configured kaniko with AWS Codecommit?

I failed trying in this way:

apiVersion: v1
kind: Pod
metadata:
  name: kaniko
spec:
  containers:
  - name: kaniko
    image: gcr.io/kaniko-project/executor:debug
    args: ["--verbosity=trace",
            "--dockerfile=K8sDockerfile",
            "--context=git://git-codecommit.eu-central-1.amazonaws.com/v1/repos/myrepo",
            "--destination=myregistryid.dkr.ecr.eu-central-1.amazonaws.com/myimage:latest"]
    env:
    - name: GIT_USERNAME
      value: 'myuser'
    - name: GIT_PASSWORD
      value: 'mypassword'
    - name: GIT_PULL_METHOD
      value: https
    volumeMounts:
      - name: kaniko-secret
        mountPath: /kaniko/.docker
  restartPolicy: Never
  volumes:
    - name: kaniko-secret
      secret:
        secretName: regcred
        items:
          - key: .dockerconfigjson
            path: config.json

This is the error:

DEBU[0000] Getting source context from git://git-codecommit.eu-central-1.amazonaws.com/v1/repos/myrepo 
DEBU[0000] Getting source from reference                

Counting objects: 0
Counting objects: 964
Counting objects: 964
Counting objects: 964, done.
Error: error resolving source context: reference delta not found
@rikirolly
Copy link
Author

I discovered the problem is not related to git pull but probably to the information contained in my repository.
Still don't know where the problem reside.

@rikirolly
Copy link
Author

Probably e problem in go-git module:
go-git/go-git#111

@aaron-prindle
Copy link
Collaborator

aaron-prindle commented May 29, 2023

It seems the issue you referenced was fixed in the go-git PR here:
go-git/go-git#392

kaniko adopted go-git w/ the fix PR in it in the PR here - #1885 (Jan 2022)

which should have been in the v1.8.0 release in March 2022. As such I think the kaniko version you used already had the go-git fix for the issue you referenced

Perhaps there is some other issue? Are you still encountering this issue?

@aaron-prindle aaron-prindle added kind/question Further information is requested priority/p2 High impact feature/bug. Will get a lot of users happy area/behavior all bugs related to kaniko behavior like running in as root area/registry For all bugs having to do with pushing/pulling into registries area/errorhandling For all bugs having to do with handling problems during kaniko execution labels May 29, 2023
@maragunde93
Copy link

I am facing the same issue with kaniko executor 1.9.1. Still not finding any solution

@markrin
Copy link

markrin commented Sep 5, 2023

Was not able to find a way to handle this, so used a workaround: archive and push source code to s3 bucket, use s3 as context. Stupid, but works smoothly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/behavior all bugs related to kaniko behavior like running in as root area/errorhandling For all bugs having to do with handling problems during kaniko execution area/registry For all bugs having to do with pushing/pulling into registries kind/question Further information is requested priority/p2 High impact feature/bug. Will get a lot of users happy
Projects
None yet
Development

No branches or pull requests

4 participants