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.
sudo: no tty present and no askpass program specified
- error if you want run action without terminal(for write pass/etc).NOPASSWD: ALL
like this :jenkins ALL= NOPASSWD: ALL