Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Authentication error in jenkins on using sudo

I have sh script in jenkins which has sudo ssh command and I am getting this error

Warning: Identity file key.pem not accessible: Permission denied.
Host key verification failed.
sudo: no tty present and no askpass program specified

I have found solutions saying add

jenkins ALL=(ALL) ALL

these lines in /etc/sudoers but still its not working.

like image 849
Uday Reddy Avatar asked Jul 30 '13 07:07

Uday Reddy


1 Answers

sudo su    
visudo -f /etc/sudoers

add add following line at the end.

jenkins ALL= NOPASSWD: ALL
like image 66
Uday Reddy Avatar answered Oct 07 '22 20:10

Uday Reddy