Skip to content

Instantly share code, notes, and snippets.

@alfredodeza
Created November 16, 2017 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alfredodeza/ca4993f90e6035ec090e1e7e759657d0 to your computer and use it in GitHub Desktop.
Save alfredodeza/ca4993f90e6035ec090e1e7e759657d0 to your computer and use it in GitHub Desktop.
decrypt jenkins secret from xml

Open your Jenkins' installation's script console by visiting http(s)://${JENKINS_ADDRESS}/script.

There, execute the following Groovy script:

println( hudson.util.Secret.decrypt("${ENCRYPTED_PASSPHRASE_OR_PASSWORD}") )

where ${ENCRYPTED_PASSPHRASE_OR_PASSWORD} is the encrypted content of the <password> or <passphrase> XML element that you are looking for.

This must include the curly braces surrounding the text.

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