kaniko icon indicating copy to clipboard operation
kaniko copied to clipboard

cant able to authenticate kaniko with GAR (google artifact repository)

Open manku211 opened this issue 9 months ago • 0 comments

build-push: stage: build-push image: gcr.io/kaniko-project/executor:debug script: - echo "Preparing Kaniko configuration..." - mkdir -p /kaniko/.docker - echo "{"auths":{"${GAR_HOSTNAME}":{"auth":"$(echo -n _json_key:$(echo "$SERVICE_ACCOUNT_KEY" | base64 -w 0) | base64 -w 0)"}}}" > /kaniko/.docker/config.json - echo "Building and pushing Docker image with Kaniko..." - /kaniko/executor --context "${CI_PROJECT_DIR}" --dockerfile "${CI_PROJECT_DIR}/Dockerfile" --destination "${GAR_HOSTNAME}/${PROJECT_ID}/${REPOSITORY}/${IMAGE_NAME}:${IMAGE_TAG}" --destination "${GAR_HOSTNAME}/${PROJECT_ID}/${REPOSITORY}/${IMAGE_NAME}:latest" only: - dev

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 "us-central1-docker.pkg.dev/PROJECT_ID/ruh-ai/livekit-worker-service:dev-bfce870e": creating push check transport for us-central1-docker.pkg.dev failed: GET https://us-central1-docker.pkg.dev/v2/token?scope=repository%3PROJECT_ID%2Fruh-ai%2Flivekit-worker-service%3Apush%2Cpull&service=: UNAUTHORIZED: authentication failed

manually with gcloud it is working fine and I have check my service account permission, it is correct

manku211 avatar Mar 20 '25 07:03 manku211