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

workflow-scm-step plugin does not find global credentials

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • None
    • Running on Jenkins ver. 2.176.2
      Credentials plugin: 2.2.1
      Credentials binding plugin: 1.19
      workflow-scm-step: 2.9

      OS: Ubuntu, 18.04.2 LTS (Bionic Beaver)

      Issue: fails to retrieve global credential and thus fails SCM step

      Description:

      When executing the pipeline or using the snippet generator tool, global credentials are not found and thus the SCM steps fail. Credentials can be created from the dropdown provided for the SCM step at the pipeline snippet generator, but are later not listed in the same dropdown, though visible in the global credentials page.

      We verified that credentials can be accessed in the pipeline using the command withCredentials(id).

      Code statement:

      checkout([$class: 'GitSCM', branches: [[name: '*/master']], userRemoteConfigs: [[credentialsId: 'github-secret', url: 'git@github.com:something/reponame.git']]])

      Execution output:
      15:15:00 Warning: CredentialId "github-secret" could not be found.15:15:00 Cloning the remote Git repository

            Unassigned Unassigned
            jmrozanec Jose Martin Rozanec
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: