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

Unable to use system credentials for global pipeline library

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor 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.

            Unassigned Unassigned
            procom_bl Thomas Bächler
            Votes:
            9 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated: