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.
More on Integration failures: SonarQube, Nexus, Docker, Trivy, kubectl
`java.lang.IllegalStateException: Unable to get SonarQube task id and/or server name. Please use the 'withSonarQubeEnv' wrapper to run your analysis.`Intermediate`waitForQualityGate` fails with `Timeout has been exceeded` though SonarQube shows the analysis as completeIntermediateMaven deploy to Nexus: `Failed to deploy artifacts: Could not transfer artifact com.shack:app:jar:1.4.0 from/to maven-releases: status code: 400, reason phrase: Repository does not allow updating assets: maven-releases (400)`BeginnerNexus returns `status code: 401, reason phrase: Unauthorized (401)` during `mvn deploy`Beginner`docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?` inside a Kubernetes agent podBeginnerKaniko: `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`Advanced