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

SonarQube Scanner: Unable to add credentials to SonarQube Server Config

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • sonar-plugin
    • None

      For Jenkins 2.464 version.

      Unable to add the credential in Manage Jenkins -> System -> SonarQube Server

        1. jenkins-1png.png
          jenkins-1png.png
          39 kB
        2. plugins.txt
          2 kB
        3. run-jenkins.sh
          0.9 kB

          [JENKINS-73413] SonarQube Scanner: Unable to add credentials to SonarQube Server Config

          Mark Waite added a comment -

          Thanks for reporting the issue. I can duplicate the problem with the following steps:

          1. Create a plugins.txt file that lists the plugins to be installed, including the SonarQube Scanner plugin
          2. Create a run-jenkins.sh file that downloads Jenkins 2.464 and the plugins in the plugins.txt file and runs Jenkins 2.464
          3. Run the run-jenkins.sh file and complete the setup wizard by creating a user and installing no additional plugins
          4. Open "Manage Jenkins" / "System" and add a Sonarqube server with a unique name like "my-qube"
          5. Attempt to add a credential with the "Add" button and see that it does not respond

          The workaround is to save the definition of the SonarQube server by pressing "Save" without adding the credential, then add the credential from the same button in a second step.

          The same problem is visible in Jenkins 2.458. As far as I can tell, this is not specific to any recent change in Jenkins core.

          Mark Waite added a comment - Thanks for reporting the issue. I can duplicate the problem with the following steps: Create a plugins.txt file that lists the plugins to be installed, including the SonarQube Scanner plugin Create a run-jenkins.sh file that downloads Jenkins 2.464 and the plugins in the plugins.txt file and runs Jenkins 2.464 Run the run-jenkins.sh file and complete the setup wizard by creating a user and installing no additional plugins Open "Manage Jenkins" / "System" and add a Sonarqube server with a unique name like "my-qube" Attempt to add a credential with the "Add" button and see that it does not respond The workaround is to save the definition of the SonarQube server by pressing "Save" without adding the credential, then add the credential from the same button in a second step. The same problem is visible in Jenkins 2.458. As far as I can tell, this is not specific to any recent change in Jenkins core.

          Mark Waite added a comment -

          Can you provide more details to share when this last worked for you?

          Mark Waite added a comment - Can you provide more details to share when this last worked for you?

          Mukul Garg added a comment -

          Hi markewaite ,

          I have done the same steps again and i am able to add the creds. But once added, the creds are not visible in server authentication token section of sonarqube in Manage Jenkins.

           

          It is a new setup of docker based deployment on Windows.

          Mukul Garg added a comment - Hi markewaite , I have done the same steps again and i am able to add the creds. But once added, the creds are not visible in server authentication token section of sonarqube in Manage Jenkins.   It is a new setup of docker based deployment on Windows.

          Mukul Garg added a comment -

          I have tried same with the latest version 2.466 and Seems same issue.

          Mukul Garg added a comment - I have tried same with the latest version 2.466 and Seems same issue.

          Mark Waite added a comment -

          You may be entering the wrong type of credential. That particular credential; requires a "secret text" credential, not one of the other credential types.

          Mark Waite added a comment - You may be entering the wrong type of credential. That particular credential; requires a "secret text" credential, not one of the other credential types.

          Mark Waite added a comment - - edited

          I have tried same with the latest version 2.466 and Seems same issue.

          Thanks for checking. Yes, I've confirmed that it behaves this way for 2.458, 2.464, and 2.466. I was wondering if you had been using a version where it behaved differently than is reported in this bug report.

          I checked Jenkins 2.414.3 using Java 17 with the most recent plugin releases supported on Jenkins 2.414.3 and confirmed that it behaves the same on Jenkins 2.414.3 as it does on Jenkins 2.466. That makes me think that it is probably a bug in the plugin that is causing the issue, not a bug in Jenkins core. You'll need to use the workaround of creating the secret text as a separate step after saving the SonarQube definition.

          Mark Waite added a comment - - edited I have tried same with the latest version 2.466 and Seems same issue. Thanks for checking. Yes, I've confirmed that it behaves this way for 2.458, 2.464, and 2.466. I was wondering if you had been using a version where it behaved differently than is reported in this bug report. I checked Jenkins 2.414.3 using Java 17 with the most recent plugin releases supported on Jenkins 2.414.3 and confirmed that it behaves the same on Jenkins 2.414.3 as it does on Jenkins 2.466. That makes me think that it is probably a bug in the plugin that is causing the issue, not a bug in Jenkins core. You'll need to use the workaround of creating the secret text as a separate step after saving the SonarQube definition.

          Mukul Garg added a comment -

          Thanks markewaite . the secret text worked.

          Mukul Garg added a comment - Thanks markewaite . the secret text worked.

            sonarteam Sonar Team
            gargmukku07 Mukul Garg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: