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

Sonar scanner: `ERROR: Not authorized. Analyzing this project requires authentication. Please check the user token in the property 'sonar.token' or the environment variable 'SONAR_TOKEN'.`

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

Likely causes → Token missing, expired or revoked; the Sonar server config in Jenkins points to a wrong credential; token lacks "Execute Analysis" permission for the project.

Diagnose → Check the credential ID in the SonarQube server config; test the token with curl -u $TOKEN: https://sonar/api/authentication/validate.

Fix → Generate a new token with the right permissions, update the Jenkins credential.

Prevent → Use a project analysis token or global analysis token owned by a service account, with rotation.

All Jenkins questions Roadmap: Jenkins

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