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

Kaniko with Tekton Pipeline: Nexus Registry Push Error "404 Not Found" #3198

Open
omeracik49 opened this issue Jun 11, 2024 · 1 comment
Open
Labels
area/permissions issue/push-fails kind/question Further information is requested needs-discussion Items which need more discussion before commitment priority/awaiting_evidence waiting on user's input before we can close of assign priority

Comments

@omeracik49
Copy link

I work at a corporate company where our network is intranet-based. We are using Nexus as our Docker registry and I am writing a pipeline in Tekton. In the pipeline, I am using Kaniko and have created the necessary config.json for Kaniko. However, when running the pipeline, I encounter the following error:

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 "nexus.example.com/project-name:image-tag": creating push check transport for nexus.example.com failed: GET https://nexus.example.com/v2/: unexpected status code 404 Not Found

Here are the YAML configurations for the volume and Kaniko:

volumes:
  - name: nexus-secret
    secret:
      items:
      - key: .dockerconfigjson
        path: config.json
      secretName: nexus

steps:
  - name: build-sources
    image: gcr.io/kaniko-project/executor:latest
    workingDir: /workspace/source/$(params.project-name)
    volumeMounts:
    - name: nexus-secret
      mountPath: /kaniko/.docker
    - name: kaniko-ssl
      mountPath: /kaniko/ssl/certs
    env:
    - name: DOCKER_CONFIG
      value: /kaniko/.docker
    command:
    - /kaniko/executor
    args:
    - --dockerfile=/workspace/source/$(params.project-name)/Dockerfile
    - --context=/workspace/source/$(params.project-name)
    - --destination=$(params.nexus-url)/$(params.project-name):$(params.image-tag)
    - --verbosity=debug

The config.json file was created using the following commands and contains:

{
  "auths": {
    "nexus.example.com": {
      "username": "my-username",
      "password": "my-password"
    }
  }
}

What I have tried:

Ensured that the config.json is correctly created and that I have the necessary permissions on Nexus.

Manually verified that the Nexus URL is correct.

Verified that Kaniko is correctly configured and that the necessary SSL certificates are present.

Problem:
I am looking for a solution to this error and guidance on how to successfully push to the Nexus Registry using Kaniko. Can anyone help?

@aaron-prindle aaron-prindle added area/permissions issue/push-fails kind/question Further information is requested needs-discussion Items which need more discussion before commitment priority/awaiting_evidence waiting on user's input before we can close of assign priority labels Jul 16, 2024
@rome-legacy
Copy link

I'm having the same issue.
this is related to docker limitations: https://help.sonatype.com/en/docker-registry.html#docker-port-scalability
what possibilities do you have: https://help.sonatype.com/en/docker-repository-reverse-proxy-strategies.html

my deployment is on microk8s and i'm trying to use nginx ingress to rewrite the URL, but so far without success.
if that doesn't work, i'll try port connector

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/permissions issue/push-fails kind/question Further information is requested needs-discussion Items which need more discussion before commitment priority/awaiting_evidence waiting on user's input before we can close of assign priority
Projects
None yet
Development

No branches or pull requests

3 participants