Jenkins plugin credential warning is bogus for freestyle job

  • Jenkins version 2.204.2
  • SonarQube Scanner for Jenkins Plugin version 2.11

We have a Jenkins pipeline script that works fine and uses Jenkins credential “jblaine-SonarQube” (the access token):

node {
  stage('SCM') {
    git credentialsId: 'some-access-token', url: ''
  stage('SonarQube analysis') {
    def scannerHome = tool 'SonarQube-Scanner-4';
    withSonarQubeEnv(credentialsId: 'jblaine-SonarQube') {
      sh "${scannerHome}/bin/sonar-scanner -Dsonar.projectKey=jblaine:MyProject"

Configuring a Freestyle job (in the same folder as the pipeline job above) to use that same credential causes the Jenkins UI to state “Cannot find any credentials with id jblaine-SonarQube”. Ignoring that warning, saving the job, and building it works fine.