jenkins中使用sudo的身份验证错误 [英] Authentication error in jenkins on using sudo
本文介绍了jenkins中使用sudo的身份验证错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在jenkins中有sh脚本,其中包含sudo ssh命令,但出现此错误
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
/etc/sudoers中的这些行,但仍然无法正常工作.
these lines in /etc/sudoers but still its not working.
推荐答案
sudo su
visudo -f /etc/sudoers
add在末尾添加以下行.
add add following line at the end.
jenkins ALL= NOPASSWD: ALL
这篇关于jenkins中使用sudo的身份验证错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文