Interview Prep/Jenkins/Integration failures: SonarQube, Nexus, Docker, Trivy, kubectl

Kaniko: `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 "docker.io/devopsshack/shack-app:main-1a2b3c4": POST https://index.docker.io/v2/devopsshack/shack-app/blobs/uploads/: UNAUTHORIZED`

AdvancedTroubleshootingIntegration failures: SonarQube, Nexus, Docker, Trivy, kubectl
Answer

Likely causes → Missing or malformed /kaniko/.docker/config.json, wrong registry key (https://index.docker.io/v1/ for Docker Hub), wrong repo name, or token lacks write scope.

Diagnose → cat /kaniko/.docker/config.json (in a debug run, never print in normal builds); verify the token can push with crane auth login and crane push.

Fix → Generate config.json with the correct auth:

AUTH=$(printf '%s:%s' "$REG_USER" "$REG_PASS" | base64 | tr -d '\n')
printf '{"auths":{"https://index.docker.io/v1/":{"auth":"%s"}}}' "$AUTH" > /kaniko/.docker/config.json

Prevent → Library step that writes the config and validates the repository name.

All Jenkins questions Roadmap: Jenkins

More on Integration failures: SonarQube, Nexus, Docker, Trivy, kubectl