jenkinsci / jenkinsci/credentials-binding-plugin

[JENKINS-59331] withCredentials certificate(aliasVariable: ) stores description of credential, not keystore alias name

Open
#472 3 comments 0 reactions 0 assignees View on GitHub
component:credentials-binding-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
57
Forks
108
PR merge metrics
No merged PRs in 30d

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.

---
Originally reported by shaiton, imported from: withCredentials certificate(aliasVariable: ) stores description of credential, not keystore alias name


  • status: Open
  • priority: Minor
  • component(s): credentials-binding-plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 2
  • imported: 20251211-141027

Raw content of original issue

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.