Unable to get to the Encryption Form

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    I’m using a local instance of SonarQube Developer Edition - Version: 9.8.0.63668

  • what are you trying to achieve
    I’m trying to get pass this screen to be able to see the form and encrypt the GitLab token as said in the documentation.


  • what have you tried so far to achieve this
    I store the secret key in the file C:/Users/ysong/Downloads/sonarqube-developer-9.8.0.63668/sonar-secret.txt of the server. I defined the property sonar.secretKeyPath in conf/sonar.properties

image
sonar.secretKeyPath=C:/Users/ysong/Downloads/sonarqube-developer-9.8.0.63668/sonar-secret.txt

I restart the server since the property sonar.secretKeyPath has been set.

Still I couldn’t see the form but stuck in this screen of generating a secret. Please help.

Please let me know where the default ~/.sonar/sonar-secret.txt is. I would love to use this if I could find it in the unzipped folder.

Thank you!

1 Like

Hey there.

We had a similar report internally and ultimately the slashes had to be escaped when defining sonar.secretKeyPath.

So in your case:

sonar.secretKeyPath=C:\\Users\\ysong\\Downloads\\sonarqube-developer-9.8.0.63668\\sonar-secret.txt

The default location for the sonar-secret.txt file is

${user.home}/.sonar/sonar-secret.txt

user.home refers to the user directory. As in /Users/myuser or /home/myuser or C:\Users\myuser . Putting sonar-secret.txt in C:\Users\User\.sonar works. If the service is registered and runs as the local system, it should be put in C:\Windows\System32\Config\systemprofile\.sonar

I believe we have a documentation update in the pipe to make this more clear.

4 Likes

Thank you so much Colin for clearing up this for me!
Yeah, it will be helpful to the community to update the documentation as right now in the Encryption part the example didn’t say the need to escape the slashes.


For the free community edition, putting the txt file in the default location has worked for me!
However, for the developer edition, as I’m on a trial right now, neither way worked. Can you confirm with me that both ways should work for the Developer Edition?

Thank you so much and happy holidays!

Hm… It should work the same way for each edition. Are you using the exact same version?

Yes Colin,
It’s the exact same version as I mentioned - SonarQube Developer Edition - Version: 9.8.0.63668.
Just received the email that my Developer Edition trial ended so I can’t show you the issue anymore.
Just wanna point out that I tried the default location way for Developer Edition and it didn’t work out as the Community Edition did. Escaping slashes also didn’t work for Developer Edition. We will move on with the Community Edition for now.
Thank you very much for your help though! :slight_smile:

I came across this topic and it describes exactly the behavior I had recently.

I’m preparing a Developer Edition Installation (not yet licensed but license is in order process) on Windows Server 2022.

I tried all options with environment variable or properties key, with escaped slashes, forward, backward … nothing helped.

Now I found my problem. I had the Windows Explorer option enabled to hide known file extensions. That produced a sonar-secret.txt.txt ! Sometimes it’s so stupid simple.

Maybe this helps someone.

3 Likes

Thank you so much Richard! I believe that’s why it didn’t work on my laptop

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.