Skip to content

Instantly share code, notes, and snippets.

@tuxfight3r
Created September 23, 2015 11:36
Show Gist options
  • Save tuxfight3r/eca9442ff76649b057ab to your computer and use it in GitHub Desktop.
Save tuxfight3r/eca9442ff76649b057ab to your computer and use it in GitHub Desktop.
Decrypting Jenkins Password
#To Decrypt Jenkins Password from credentials.xml
#<username>jenkins</username>
#<passphrase>your-sercret-hash-S0SKVKUuFfUfrY3UhhUC3J</passphrase>
#go to the jenkins url
http://jenkins-host/script
#In the console paste the script
hashed_pw='your-sercret-hash-S0SKVKUuFfUfrY3UhhUC3J'
passwd = hudson.util.Secret.decrypt(hashed_pw)
println(passwd)
@sigmunau
Copy link

@vijayg92 , @egr-ext This works for me:

println(new String(com.cloudbees.plugins.credentials.SecretBytes.fromString("{....}").getPlainData(), "ASCII"))

@TheFluo
Copy link

TheFluo commented Aug 24, 2023

Hello, if you don't have acces to the console ... to verify for example the LDAP password that was encrypted ... how do you decrypt the generated password in the config.xml for the LDAP ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment