In my deployment project I need to execute sudo in order to change ownership and permissions. When I try to execute it as command or a inline shell script I get following error:
you must have tty to run sudo
Is there a way to work around this?
Community moderators have prevented the ability to post new answers.
on the remote agent, execute:
sudo visudo
then just remove the 'requiretty' setting. If you want to limit it to users/specific commands, google for it, there are some ready made recipes for it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The real solution would be for the SSH Task in Bamboo to offer a "Force pseudo-tty allocation" option (i.e. the equivalent of ssh -t).
This would avoid having to open up security holes in /etc/sudoers to accomodate Bamboo jobs that require sudo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looks like bamboo user which is used on the tasks script is not a sudoer. You can add via the init script on the image config
echo 'bamboo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/cloud-init
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's an OS related question
http://www.cyberciti.biz/faq/linux-unix-bsd-sudo-sorry-you-must-haveattytorun/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you explain to me why this command is executed via SSH when it should be executed on the remote agent? Are deployment tasks assigned to a remote agent not executed directly on the remote machine?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you explain to me why this command is executed via SSH when it should be executed on the remote agent? Are deployment tasks assigned to a remote agent not executed directly on the remote machine?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you explain to me why this command is executed via SSH when it should be executed on the remote agent? Are deployment tasks assigned to a remote agent not executed directly on the remote machine?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.