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

前端 未结 26 1683
失恋的感觉
失恋的感觉 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:16

    Login into your linux. Fire following commands. Be careful, as editing sudoer is a risky proposition.

    $ sudo visudo
    

    Once vi editor opens make the following changes:

    1. Comment out Defaults requiretty

      # Defaults    requiretty
      
    2. Go to the end of the file and add

      jenkins ALL=(ALL) NOPASSWD: ALL
      

提交回复
热议问题