Configuring Sonar Token - dogtagpki/pki GitHub Wiki
-
Go to
https://sonarcloud.io/and create an account by signing up with your GitHub -
Create a token by going to "My Account" > "Security", provide a token name, and select "Generate Token"
-
Copy the token and go to your fork of the repo in GitHub
-
Go to "Settings", navigate to "Security" > "Secrets and Variables", and select "Actions"
-
Select "New repository secret"
-
In the Name section enter SONAR_TOKEN and paste the copied secret into the Secret section.
Create a new push into your repo and verify the Sonar Cloud code analysis passes (or fails without the error "Failed to query JRE metadata: . Please check the property sonar.token or the environment variable SONAR_TOKEN). If you already have a failed run, once the token is added verify Sonar Cloud code analysis passes or fails without the error above.