How to fix 'sudo: no tty present and no askpass program specified' error?

前端 未结 26 1632
失恋的感觉
失恋的感觉 2020-11-22 03:36

I am trying to compile some sources using a makefile. In the makefile there is a bunch of commands that need to be ran as sudo.

When I compile the sour

26条回答
  •  你的背包
    2020-11-22 04:14

    Running shell scripts that have contain sudo commands in them from jenkins might not run as expected. To fix this, follow along

    Simple steps:

    1. On ubuntu based systems, run " $ sudo visudo "

    2. this will open /etc/sudoers file.

    3. If your jenkins user is already in that file, then modify to look like this:

    jenkins ALL=(ALL) NOPASSWD: ALL

    1. save the file

    2. Relaunch your jenkins job

    3. you shouldnt see that error message again :)

提交回复
热议问题