-
Bug
-
Resolution: Cannot Reproduce
-
Major
-
Jenkins 2.354
GitHub plugin Version 1.34.3
Pipeline Version 2.6
Pipeline: Multibranch Version 716.vc692a_e52371b_
Jenkins is running in a linux docker container (jenkins/jenkins:lts@sha256:99fd3cb74257d1df7678c19106586a2da127cd1b08484c9201c7130d4fab92c1)
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.