Last active
May 18, 2018 10:51
-
-
Save MaRuifeng/98ec3653bb7ff33132fbedc644e92437 to your computer and use it in GitHub Desktop.
Obtain password masked out by the EnvInject plugin in Jenkins
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The EnvInject is a pretty old Jenkins plugin, but it happens to be still in use | |
# and if a password masked by it is forgotten, it can be retrieved as below. | |
# Suppose it is a global password configured on the 'Configure System' page on Jenkins. | |
# Log into the Jenkins server host and look for the encrypted string in envInject.xml. | |
cd /var/lib/jenkins | |
vim envInject.xml | |
# Go to the groovy script console of the Jenkins server (https://JENKINS_HOST:JENKINS_PORT/script), and run below script | |
println(hudson.util.Secret.fromString('{SamPLEEnctyptEdString}') ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment