Friday, February 14, 2020

Decode Jenkins Password


Reference:https://devops.stackexchange.com/questions/2191/how-to-decrypt-jenkins-passwords-from-credentials-xml
  1. In Jenkins, go to: /script page.
  2. Run the following command:
    println(hudson.util.Secret.decrypt("{XXX=}"))
    
    or:
    println(hudson.util.Secret.fromString("{XXX=}").getPlainText())
    
    where {XXX=} is your encrypted password. This will print the plain password.
    To do opposite, run:
    println(hudson.util.Secret.fromString("some_text").getEncryptedValue())

No comments:

Post a Comment