I am trying to add some file in a remote server by BigTuna (continuous integration tool), and it give me a error message. Any one have any idea how can I add that file to server?
sudo: no tty present and no askpass program specified
I am trying to add some file in a remote server by BigTuna (continuous integration tool), and it give me a error message. Any one have any idea how can I add that file to server?
sudo: no tty present and no askpass program specified
This is due to 'requiretty' option on /etc/sudoers. If you have access to it, you might just remove that option.
If not, there are other ways as well. Probably you are doing something like ssh user@host sudo do_something. You can try to add -t option to allocate tty by ssh (so it would be ssh -t user@host sudo do_something).
Your application use the sudo command in a no tty, you may bypass this by editing the file /etc/sudoers and comment this line :
Defaults requiretty
Command sudo fails as it is trying to prompt on root password and there is no pseudo-tty allocated (as it's part of the script).
You need to either log-in as root to run this command or set-up the following rules in your /etc/sudoers
(or: sudo visudo):
# Members of the admin group may gain root privileges.
%admin ALL=(ALL) NOPASSWD:ALL
Then make sure that your user belongs to admin group (or wheel).
Ideally (safer) it would be to limit root privileges only to specific commands which can be specified as %admin ALL=(ALL) NOPASSWD:/path/to/program