-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Windows Server 2012 R2 64 Bit
Java SE 1.8.0_144
Jenkins 2.60.2 (running as Windows service)
Pipeline: Shared Groovy Libraries 2.8
Credentials Plugin 2.1.14
I am trying to add a global shared library in the Jenkins configuration. The library is in a Git repository which is accessed via https with password authentication. I configured this library using the Modern SCM option.
I added the credentials with the name "Jenkins Credentials" in the global credentials store with "System" scope.
The global library configuration says "Currently maps to revision: <correct revision>" for the default version, which indicates that the configuration is correct.
When I try to use this library in a job, the message "using GIT_ASKPASS to set credentials Jenkins Credentials", however, authentication fails ("fatal: Authentication failed for 'https://[...]'" from git fetch).
When I set the credentials from "System" to "Global" scope, the job works as expected. However, with this configuration, everyone with permissions to create jobs can use these credentials in their job, which is not desired.
Sounds like something relevant to the CPS global library plugin. Nothing relevant to the credentials plugin. Unclear if this is a bug or an RFE (need guidance from jglick as to what the intended scope resolution is for loading libraries, but it would seem reasonable to me to expect that loading a global library defined at the root of Jenkins (not in a folder) should be able to use SYSTEM scoped credentials (especially if the drop-down is listing them as valid)