Use encrypted tokens

Vahid's Avatar


14 Jan, 2018 10:05 AM

I encrypt a token (a SonarCloud token) using AppVeyor encryption tool (, and declare it as the following:

     secure: zx9FQl2yXcPb8X7A4BqN753h1TFSuHioq13TFRwQk04/1cSxEFaqR1j+UAuJhyT7

Then I use it as the following (in the same appveyor.yml file):

- MSBuild.SonarQube.Runner.exe end /d:"sonar.login=%sonartoken%"

But then Sonar complains the token being invalid.

I have tried the followings too:

- MSBuild.SonarQube.Runner.exe end /d:"sonar.login=$env:sonartoken"
- ps: MSBuild.SonarQube.Runner.exe end /d:"sonar.login=$env:sonartoken"

  1. Support Staff 1 Posted by Ilya Finkelshte... on 14 Jan, 2018 02:49 PM

    Ilya Finkelshteyn's Avatar


    You are trying using secure variables in pull request. However secure variables are not available in Pull Requests. For open source projects you can use "Enable secure variables in Pull Requests from the same repository only" option available in the UI, in project General Settings.


Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac