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

Cannot use non-global ssh key credential in pipline job configuration

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • git-plugin

      When configuring a pipeline job, a non-global ssh key credential cannot be chosen when defining the git repository that contains the Jenkinsfile.

      Repro:

      • Go to "manage credentials"
      • Go to "Stores scoped to Jenkins" to get to the "system" scope
      • Create a new domain (or use an existing one)
      • Create a "ssh username with private key" credential
      • Create a new "Pipeline" job
      • Configure the job
      • Under "pipeline" -> "definition", choose "Pipeline script from SCM", then "Git", then fill in a git url in ssh format.
      • Click the "credentials" dropdown. Notice that the newly created ssh credential does not appear on the list.

      However, the ssh key actually does appear for a multi-branch pipeline job.

      Also, the ssh key actually does appear for a pipeline job if the credential is in the global scope. 

       

      I don't believe that this is just a UI problem. We had a pipeline job that had previously been working and had been configured with a system domain scope ssh key. At some point, it started failing with Permission denied (publickey) . Upon opening the job configuration, the UI showed that the credential was missing (not "None", but missing), even though the credential still existed. The credential no longer appeared on the list of credentials in the job config UI.

            Unassigned Unassigned
            cowlinator p cowlinator
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: