Skip to content

Instantly share code, notes, and snippets.

@samit2040
Forked from tuxfight3r/jenkins-decrypt.groovy
Created September 21, 2017 13:47
Show Gist options
  • Save samit2040/b24c583fe20c9d6697c0651e22035f0f to your computer and use it in GitHub Desktop.
Save samit2040/b24c583fe20c9d6697c0651e22035f0f 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment