Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide password from jenkins shell output

I have two scripts first on file system,second into jenkins job. Second script calling the first and passed parameters into it. Parameters contains password parameter. How can I hide password into logs? I have tried to hide output by using exec command but problem wasn't solved.

like image 757
Steelflax Avatar asked May 12 '14 10:05

Steelflax


People also ask

How do I hide passwords in Jenkins console output?

Installing the Mask Password PluginFirst install the Jenkins Mask Passwords plugin. Navigate to manage Jenkins and click Manage Plugins. Search for Mask Passwords. Select the plugin then click “Download now and install after restart”.

How do I unmask Jenkins credentials?

If you don't have admin privileges, try to elevate your permissions by looking for an admin user in Global credentials first. To open Script Console navigate to http://localhost:8080/script . There you have it; now you can decrypt any Jenkins secret (if you have admin privileges).

How do I create a hidden text in Jenkins?

Secret text - copy the secret text and paste it into the Secret field. Username and password - specify the credential's Username and Password in their respective fields. Secret file - click the Choose file button next to the File field to select the secret file to upload to Jenkins.


1 Answers

The Mask Passwords plugin does just that.

like image 116
l0b0 Avatar answered Oct 05 '22 23:10

l0b0