Jenkins use your linux box with user called “jenkins”. We might want to tell the OS not to ask password while executing commands.
1. open /etc/sudoers
sudo nano /etc/sudoers
2. Add/Modify jenkins user
Look for the entry for jenkins user. Modify as below if found or add a new line.
jenkins ALL=(ALL) NOPASSWD: ALL
3. Save and Exit from edit mode
ctl + x, it will ask you if you want to save your change, then type “
y” for yes, then hit
4. Restart Jenkins service
To restart jenkins service:
systemctl restart jenkins