How to change name of SONAR_TOKEN

  • ALM used - GitHub

  • CI system used -

  • Scanner command used when applicable (private details masked) -

  • Languages of the repository - Typescript

  • Only if the SonarCloud project is public, the URL - private

  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting) - none

  • Steps to reproduce:

I’m trying to follow this documentation: GitHub Actions | SonarCloud Docs

I’ve inherited a monorepo which has a number of different Sonarcloud projects set up, all of which are subfolders of a GitHub monorepo.

Because there are multiple projects, they each have a different SONAR_TOKEN, e.g. if the subfolder’s name was ‘subfolder’ then the token is SUBFOLDER_SONAR_TOKEN.

However, I now need to create a new Sonarcloud project for a new subfolder and the person who set up the previous projects has left. The documentation doesn’t indicate how I can customise the name of the sonar token for a new project, and there is no edit button next to the name of the SONAR_TOKEN.


Welcome to the community!

Tokens can’t be renamed, but when you generate the token for the new project, you can pick the name for it. You’ll find this under the ‘My Account’ option (top-right under your avatar):