Skip to content

Instantly share code, notes, and snippets.

@jeremyweber-np
Forked from tuxfight3r/jenkins-decrypt.groovy
Created August 16, 2018 19:59
Show Gist options
  • Select an option

  • Save jeremyweber-np/3c3581c9698a999e15342e2e7713976c to your computer and use it in GitHub Desktop.

Select an option

Save jeremyweber-np/3c3581c9698a999e15342e2e7713976c to your computer and use it in GitHub Desktop.

Revisions

  1. @tuxfight3r tuxfight3r created this gist Sep 23, 2015.
    12 changes: 12 additions & 0 deletions jenkins-decrypt.groovy
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    #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)