Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-58061

Can't configure SonarQube User Token (text field replaced with credentials drop-down).

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • credentials-plugin
    • None
    • Jenkins 2.176.1 and 2.249.2
      Ubuntu 18.04 w/ Tomcat8 and Windows Server 2016 Tomcat9.0.10
      Credentials Plugin v2.2.0 and v2.3.13
      "SonarQube Scanner for Jenkins" v2.9 and v2.12

    Description

      All tutorials I've seen for the SonarQube plugin show a text field to paste in the User Token. However, I'm seeing a Credentials dropdown for selecting and/or adding a token, except I'm unable to add a token in any form that works (screenshot attached) as nothing ever appears in the dropdown to select a defined token.

      I'm unsure if this is due to an issue with the SonarQube plugin or Credentials plugin. (Sorry if I guessed wrongly).

       

       

      Attachments

        Activity

          archagy alexis villegas added a comment - - edited

          Same Issue...I was looking to add a new credential for sonarqube like I did for SSH but there is no option for that.

           

          EDIT:

           

          I follow the configuration for this url https://groups.google.com/forum/#!topic/jenkinsci-users/ONnVPSIExH4

           

          basically on the credentials page you have to add the token as secret text and give it an ID. after that the ID will show up on the dropdown for sonarqube token option.

          archagy alexis villegas added a comment - - edited Same Issue...I was looking to add a new credential for sonarqube like I did for SSH but there is no option for that.   EDIT:   I follow the configuration for this url  https://groups.google.com/forum/#!topic/jenkinsci-users/ONnVPSIExH4   basically on the credentials page you have to add the token as secret text and give it an ID. after that the ID will show up on the dropdown for sonarqube token option.
          predatorvi Jeff VIncent added a comment - - edited

          I do have it working with a "secret text" token.

          However, there is an issue with the Credentials integration because if I attempt to click the "Add..." button from the job configuration page, it either does nothing, or allows me to enter the new credential information but won't actually save it.

          ##01 - Click Add -> Jenkins##

               

          ##02 - Add new Super Secret Text Token##

               

           

          ###03 - Attempt to select (no SuperSecretTextTestToken listed)###

               

           

          ###04 - Check Credential store###

          (no SuperSecretTextTestToken listed)

               

               

          I can add it if I go to the Credential manager first.  

          I do see a warning however, in this case that even if I pick a valid "secret text" credential for SonarQube even though the secret text credential works fine:

           

               

          predatorvi Jeff VIncent added a comment - - edited I do have it working with a "secret text" token. However, there is an issue with the Credentials integration because if I attempt to click the "Add..." button from the job configuration page, it either does nothing, or allows me to enter the new credential information but won't actually save it. ##01 - Click Add -> Jenkins##       ##02 - Add new Super Secret Text Token##         ###03 - Attempt to select (no SuperSecretTextTestToken listed)###         ###04 - Check Credential store### (no SuperSecretTextTestToken listed)             I can add it if I go to the Credential manager first.   I do see a warning however, in this case that even if I pick a valid "secret text" credential for SonarQube even though the secret text credential works fine:        
          hesc shucai he added a comment -

          Same Issue...

          hesc shucai he added a comment - Same Issue...

          Hello there,

          I got into the same situation, i created an account to write the solution:

          • uninstall Sonarqube 2.9 plugin (restart jenkins);
          • go to https://updates.jenkins.io/download/plugins/sonar/   and download 2.8.1 version of the same plugin;
          • then go to Jenkins >> Manage Plugins >> Advanced >> Upload Plugin >> Choose file >> Restart Jenkins and it will work ( at least for me it solved the same issue)

          PS: I had used lts, then changed to Jenkins ver. 2.191 hoping that will solve it but it didn't but i did not changed to lts so the above steps are done on 2.191 with Credentials Plugin 2.3.0 and Plain Credentials Plugin 1.5.0

          m4rc Marcu Alexandru added a comment - Hello there, I got into the same situation, i created an account to write the solution: uninstall Sonarqube 2.9 plugin (restart jenkins); go to  https://updates.jenkins.io/download/plugins/sonar/    and download 2.8.1 version of the same plugin; then go to Jenkins >> Manage Plugins >> Advanced >> Upload Plugin >> Choose file >> Restart Jenkins and it will work ( at least for me it solved the same issue) PS: I had used lts, then changed to  Jenkins ver. 2.191 hoping that will solve it but it didn't but i did not changed to lts so the above steps are done on 2.191 with  Credentials Plugin  2.3.0 and  Plain Credentials Plugin  1.5.0
          mysterejack Matthieu R. added a comment -

          Hello,

          Is this issue will be resolved ? Or a workaround will be explained ? I can't configure Sonar Scanner without downgrade plugins versions.

          Thanks,

          mysterejack Matthieu R. added a comment - Hello, Is this issue will be resolved ? Or a workaround will be explained ? I can't configure Sonar Scanner without downgrade plugins versions. Thanks,
          ianw Ian Williams added a comment -

          predatorvi, wondering why this is not flagged as Component "sonar" as well? That might get the attention of the SonarQube team.

          ianw Ian Williams added a comment - predatorvi , wondering why this is not flagged as Component "sonar" as well? That might get the attention of the SonarQube team.
          n_o_a Nils Oliver Adam added a comment - - edited

          You may only chose credentials of the type "secret-text". 

          I can't figure out how to use a key without USER+PASSWORD within Sonarqube.
          If this was possible the Jenkins "secret-text" key maybe could work 

          n_o_a Nils Oliver Adam added a comment - - edited You may only chose credentials of the type "secret-text".  I can't figure out how to use a key without USER+PASSWORD within Sonarqube. If this was possible the Jenkins "secret-text" key maybe could work 

          People

            Unassigned Unassigned
            predatorvi Jeff VIncent
            Votes:
            4 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated: