Cannot setup SonarLint in IntelliJ using Github Token: The 'organization' parameter is missing

  • SonarLint IntelliJ 4.9.0.19370

  • IntelliJ 2020.1.2 Community edition

  • error observed:
    Error 400 on https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,htmlDesc,htmlNote,internalKey,isTemplate,templateKey,actives&statuses=BETA,DEPRECATED,READY&types=CODE_SMELL,BUG,VULNERABILITY&severities=INFO&p=1&ps=500: The 'organization' parameter is missing

  • steps to reproduce:

  1. SonarLint Settings, Add SoarQube / SonarCloud connections
  2. Name : sonarcloud, type : sonarcloud [next]
  3. Authentication Type : token, [create token]
  4. select GitHub, logon and follow steps in GitHub to create token
  5. Paste token en clcik [next]
  6. click [Finish]
  7. wait while ‘update binding runs’
  8. error shown above will appear
  • potential workaround: N/A

P.S. In the Eclipse version of this plugin there is an option to add a ‘project’ option, in my case I can enter ‘onap’ there and it works fine…

Hello,

Welcome to the SonarSource Community!

The token you are looking for is from SonarCloud, not GitHub. Log in to your SonarCloud account and click on you avatar in the upper right, then “My Account” and then “Security” to generate a token.

Cheers

Brian

2 Likes

Hi Brian,

Thanks for your quick reply (this is actually my second persona in sonarsource for a new company :-))
I probably didn’t explain well enough, i was using sonarsource to generate a token, I log inton SonarSource using a GitHub account. It gets a bit tricky to keep track these days with single-sign-on options.
You put me on the right track though; I checked the menu options you pointed out and realized I had no organization setup under this (new) account and that’s why I got the error in SonarLint plugin.
I have now done so and it is working as expected.
Thanks,
Toine

1 Like

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

Hello,

We created a ticket to address this issue: https://jira.sonarsource.com/browse/SLI-426

Thanks for your feedback
Damien