GoogleContainerTools / kaniko

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

error checking push permissions -- make sure you entered the correct tag name #2222

Open eravindar12 opened 2 years ago

eravindar12 commented 2 years ago

I see below the issue and how to fix it.

$ export DOCKER_REPOSITORY=${DOCKER_REPOSITORY:-ecommerce/$CI_PROJECT_NAME${APP:+/}$APP}
$ echo "{\"auths\":{\"$DOCKER_REGISTRY\":{\"username\":\"$DFWP_HARBOR_USER\",\"password\":\"$DFWP_HARBOR_PASS\"}}}" > /kaniko/.docker/config.json
$ /kaniko/executor \ # collapsed multi-line command
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 "dfwpharb01.sial.com/ecommerce/aem-cms/aem-dispatcher:release-integration-3513e70d": POST https://dfwpharb01.sial.com/v2/ecommerce/aem-cms/aem-dispatcher/blobs/uploads/: UNAUTHORIZED: unauthorized to access repository: ecommerce/aem-cms/aem-dispatcher, action: push: unauthorized to access repository: ecommerce/aem-cms/aem-dispatcher, action: push
iJebus commented 2 years ago

I'm seeing similar with pushing to GCP artifact registry, looks like possible regression of https://github.com/GoogleContainerTools/kaniko/issues/1786? Per the comments on that issue, pushing works when using 1.6.0.

vmamidala-conga commented 2 years ago

ECR Push operation is failing with following error using kaniko, it used to work until yesterday. Kaniko version - v1.6.0 I tried testing it out with v1.7.0, v1.9.0 (latest) but still facing same issue. Any one had same issue? and resolved? I really appreciate you help 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 "https://ecr-private-repo/uploads": Post "https://ecr-private-repo/uploads": EOF

mofirouz commented 2 years ago

Yep same issue here - works with v1.6.0, but any newer and it's borked.

jessequinn commented 1 year ago

v1.6.0 does not work for me .. all the way up to 1.12.1. It was working yesterday.

zijiwork commented 1 year ago

Depending on this issue is not resolved, tekton kaniko version upgrade from 1.5.1 to 1.13.0 will not work

tirelibirefe commented 1 year ago

ECR Push operation is failing with following error using kaniko, it used to work until yesterday. Kaniko version - v1.6.0 I tried testing it out with v1.7.0, v1.9.0 (latest) but still facing same issue. Any one had same issue? and resolved? I really appreciate you help 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 "https://ecr-private-repo/uploads": Post "https://ecr-private-repo/uploads": EOF

Hello @vmamidala-conga Were you able to fix the problem? I have the same problem; I tried v.1.16.0 and 1.17.0, nothing changed.

Thanks & Regards

tirelibirefe commented 1 year ago

1.5.1

1.12.1 didn't work at me.

ALGHARRASS-AYOUB commented 6 months ago

you must verify the encoded value of auth. if you use "username:password" to authenticate you must encode it as : echo -n "username:password" | base64 and not : echo username:password | base64.

then you can put the content below to this location /kaniko/.docker/config.json the content of the file:

{
       "auths": {
                "YOUR_CI_REGISTRY": {
                 "auth": ENCODED_BASE64_STRING"
                }
}
tbernacchi commented 3 months ago

same here

hardikbansal commented 1 month ago

Same problem here as well. Any fix for this? Facing the same problem with "pkg.dev" based google artifacts repositories as well. Not sure what is wrong here.