Vittorio C.
Vittorio C.

Reputation: 41

SonarQube 6.7: how do no-admin users create a project?

I have just installed SonarQube 6.7 and I am creating users for my colleagues, who would like to create a project from their source code hosted on GitHub repositories.

So far I did not find a way to let users create a project, without setting them as system administrator. Apparently a project is created indeed from the Create Project button on the Administration > Projects > Management page as reported in the official documentation.

Unfortunately in this way, most users should be set as admin if they want to create projects: therefore they will be able to manage the users and the whole system. As you can imagine it is not ideal situation, when a lot of administrators on a system.

How can users be able to create a project without having admin privileges over the whole system (configuration, security, users, etc.)?

I thank you in advance for your help!

Upvotes: 2

Views: 2271

Answers (3)

Midhun
Midhun

Reputation: 11

Vittorio C. I have the same issue as you in the SonarQube 6.7.

Issue: few options will not show up for example "create projects under global permissions"

Resolution: Just search the "create user"s in the search window( shown in the screenshot) and it will start appearing.

screen shot

Also if you think any option is not appearing but which ideally should, you can apply the same trick.

Upvotes: 1

G. Ann - SonarSource Team
G. Ann - SonarSource Team

Reputation: 22804

Your users need the Create Projects global permission. You can grant this individually or by putting them in a group and giving the group the permission.

They'll need the Execute Analysis global permission as well (another argument for using a group). Once these permissions are granted, they'll be able to analyze projects. Any project that doesn't already exist will be created in SonarQube on the first analysis.

Upvotes: 1

Maxence Lecointe
Maxence Lecointe

Reputation: 238

for example with maven, mvn package sonar:sonar will create project if no exist in sonarqube.
If you want to create it before first use you can use web api, for example have a look at https://next.sonarqube.com/sonarqube/web_api/api/projects/create
If i'm not wrong the create API is open to everyone.

Upvotes: 0

Related Questions