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

withCredentials certificate(aliasVariable: ) stores description of credential, not keystore alias name

    Details

    • Similar Issues:

      Description

      plugin version 1.18

      I am trying to use this certificate binding but in a simple job :
      keystore variable: CERTSTORE
      Alias Variable: MYKEY

      step as a standard shell script:

      keytool -list -v -keystore $CERTSTORE
      
      echo $MYKEY
      
      keytool -export -alias "$MYKEY" -keystore "$CERTSTORE" -rfc -file fit-kernel.cert
      

      output us

      + keytool -list -v -keystore ****
      Enter keystore password:  
      *****************  WARNING WARNING WARNING  *****************
      * The integrity of the information stored in your keystore  *
      * has NOT been verified!  In order to verify its integrity, *
      * you must provide your keystore password.                  *
      *****************  WARNING WARNING WARNING  *****************
      
      Keystore type: JKS
      Keystore provider: SUN
      
      Your keystore contains 1 entry
      
      Alias name: 1
      Creation date: Sep 12, 2019
      Entry type: PrivateKeyEntry
      
      
      *******************************************
      *******************************************
      
      
      + echo
      
      + LANG=C
      + keytool -export -alias '' -keystore **** -rfc -file fit-kernel.cert
      Enter keystore password:  
      *****************  WARNING WARNING WARNING  *****************
      * The integrity of the information stored in your keystore  *
      * has NOT been verified!  In order to verify its integrity, *
      * you must provide your keystore password.                  *
      *****************  WARNING WARNING WARNING  *****************
      
      keytool error: java.lang.Exception: Alias <> does not exist
      

      "$MYKEY" should exists but is not defined as an environment variable, I can't access my certificate.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              shaiton Kevin Raymond
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: