Skip to content

Instantly share code, notes, and snippets.

@tizki
Created April 2, 2017 13:10
Show Gist options
  • Save tizki/9a57adf636cc1628cc6f1f6ca65b3432 to your computer and use it in GitHub Desktop.
Save tizki/9a57adf636cc1628cc6f1f6ca65b3432 to your computer and use it in GitHub Desktop.
Decrypt Jenkins hashed passwords
//This script can be used in order to decrypt password from Jenkins' credentials.xml file
//The passwords in the file are hashed using Jenkins' key. In order to un-hash them:
// 1.Copy the required password
// 2. open Jenkins script console http://your-jenkins/script
// 3. exectue the following code:
def ENCRYPTED_PASSWORD = "paste the password here"
println( hudson.util.Secret.decrypt("${ENCRYPTED_PASSWORD}") )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment