How to configure properties for Github Auth plugin through code/API

(Archana) #1

Hi all,

We are using SonarQube Community Edition version 7.6
We have installed Github Authentication plugin version - and placed it into $SONARQUBE_HOME/extensions/plugins/

This documentation ( tells us how to configure the properties via SonarQube UI.

By plugin properties, we mean
sonar.auth.github.loginStrategy etc.

We have tried updating the plugin properties by adding them to $SONARQUBE_HOME/conf/ file, however, none of the properties get updated. We want to maintain all the infrastructure we’re building, as code, and version control it. What’s the best way to do that?

We have also checked some available APIs for plugins. But, they only allow us to install, uninstall, update etc, but do not allow us to configure the plugin properties on SonarQube. Is there a way we could configure them through API, if not for properties file?


(Julien Lancelot) #2


It’s not possible to configure server settings in You need to use api/settings/set after the server is started if you want to configure the settings by a script or something like that.

Julien Lancelot

(Archana) #3

Hi Julien,

Thank you for the prompt response. That helps. I have checked out the api/settings/set API as mentioned above. However, it looks like we can only set one key at a time. Is there a way we could set multiple keys with a single API call?

Example: Currently, this is what I can do:
curl -X POST -u username:password ''
Can I set multiple such key-value pairs through a single call?


(Julien Lancelot) #4

No it’s only possible to set one setting at a time.

(Archana) #5

Okay, thanks for letting us know, Julien. Is there a plan to support multiple keys in the future?

(Julien Lancelot) #6

Not for the moment sorry.

(Archana) #7

Okay. Thanks for letting us know.