luni, 13 octombrie 2014

Jenkins no tty

When running a jenkins job which does a sudo command in a script, some errors occurs related to failed authentication.

A possible fix for it is:
- add user in sudoers without password (or use ssh keys)
- on redhat systems (including centos) we still get:
sudo: sorry, you must have a tty to run sudo

To solve it , comment the line in /etc/sudoers using visudo :

Defaults requiretty