jenkinsci / jenkinsci/credentials-binding-plugin
[JENKINS-59331] withCredentials certificate(aliasVariable: ) stores description of credential, not keystore alias name
- 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 $CERTSTOREecho $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: SUNYour 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
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: MYKEYstep as a standard shell script:
keytool -list -v -keystore $CERTSTOREecho $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: SUNYour 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
Assessment
This issue has not been assessed yet.