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

Gitlab ID could not be found but is set and works

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • credentials-plugin
    • Jenkins ver. 2.150.3

      Credentials Plugin 2.1.18

      I've updated my Jenkins installation to 2.150 and also plugins. I've set Gitlab token in Jenkins configuration and connection works without problem when I click on "Test connection" button.

      When I launch a pipeline Job, repository is correctly pulled but I've the following warning in console output:

      Warning: CredentialId "RENO-Gitlab" could not be found.
      

      Here is my pipeline code:

       checkout([
         $class: 'GitSCM',
          branches: [[name: "origin/dev"]],
          userRemoteConfigs: [[credentialsId: 'RENO-Gitlab', url: 'git@mygitlab.group/project.git']]
      ])
      

      So the Job starts well and works but this warning is displayed.

          [JENKINS-56537] Gitlab ID could not be found but is set and works

          José Lamas added a comment -

          FWIW: I was seeing a similar problem and changing to double quotes for the credentials parm did the trick.

          This issued a 'Warning: CredentialId "${gitCredentials}" could not be found.'

          git changelog: false,  poll: false,
          {{   url: 'https://github.com/genexuslabs/PlanCoronaVirus.git',}}
            credentialsId: '${gitCredentials}'

          Seeing that the environment variable wasn't resolved was a hint. This works ok:

          git changelog: false,  poll: false,
          {{   url: 'https://github.com/genexuslabs/PlanCoronaVirus.git',}}
            credentialsId: "${gitCredentials}"

           
           

          José Lamas added a comment - FWIW: I was seeing a similar problem and changing to double quotes for the credentials parm did the trick. This issued a 'Warning: CredentialId "${gitCredentials}" could not be found.' git changelog: false,  poll: false, {{   url: 'https://github.com/genexuslabs/PlanCoronaVirus.git',}}   credentialsId: '${gitCredentials}' Seeing that the environment variable wasn't resolved was a hint. This works ok: git changelog: false,  poll: false, {{   url: 'https://github.com/genexuslabs/PlanCoronaVirus.git',}}   credentialsId: "${gitCredentials}"    

            Unassigned Unassigned
            algorys Estrada Matthieu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: