Configuring Sonar Token - dogtagpki/pki GitHub Wiki

Overview

Steps for Configuration

  1. Go to https://sonarcloud.io/ and create an account by signing up with your GitHub

  2. Create a token by going to My Account > Security, provide a token name, and select Generate Token

  3. Copy the token and go to your fork of the repo in GitHub

  4. Go to Settings, navigate to Security > Secrets and Variables, and select Actions

  5. Select New repository secret

  6. In the Name section enter SONAR_TOKEN and paste the copied secret into the Secret section.

Verification

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.

⚠️ **GitHub.com Fallback** ⚠️