GoogleContainerTools / kaniko

Build Container Images In Kubernetes
Apache License 2.0
14.94k stars 1.45k forks source link

push permission error (help needed) #2416

Open hello2ray opened 1 year ago

hello2ray commented 1 year ago

Kaniko step in tekton

- name: build-push-image
  image: gcr.io/kaniko-project/executor:latest
  command:
     - /kaniko/executor
  args:
    - --dockerfile=/workspace/repo/createImage/Dockerfile
    - --context=/workspace/repo/createImage
    - --destination=index.docker.io/santanuray123/tektontestimage
    - --verbosity=debug
    - --skip-tls-verify

Docker File

FROM python:3.6-slim

It specifies the working directory where the Docker container will run

WORKDIR /app

Copying all the application files to the working directory

COPY . .

Install all the dependencies required to run the Flask application

RUN pip install -r requirements.txt

Expose the Docker container for the application to run on port 5000

EXPOSE 5000

The command required to run the Dockerized application

CMD ["python", "/app/app.py"] ~

Below error observed when running tekton task.

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 "index.docker.io/santanuray123/tektontestimage": creating push check transport for index.docker.io failed: GET https://index.docker.io/v2/: unexpected status code 404 Not Found: <?xml version="1.0" encoding="iso-8859-1"?>

hello2ray commented 1 year ago

once I change docker hub v2 to v1, received below 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 "index.docker.io/santanuray123/tektontestimage": POST https://index.docker.io/v2/santanuray123/tektontestimage/blobs/uploads/: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:santanuray123/tektontestimage Type:repository] map[Action:push Class: Name:santanuray123/tektontestimage Type:repository]]

tbernacchi commented 4 months ago

@hello2ray were you able to solve this? Would you mind share with us how did you do it?

mafeifan commented 3 months ago

same error, some image can push success, but some failed, so weird