我正在使用git post-update挂钩通过sudo运行一个命令,而我得到这个错误: sudo: sorry, you must have a tty to run sudo 。 我相信我需要修改/etc/sudoers但我不知道该怎么做。 任何帮助,将不胜感激!
sudo: sorry, you must have a tty to run sudo
/etc/sudoers
如果你有线
Defaults requiretty
在你的sudoers文件中,注释掉它。
sudoers