【发布时间】:2012-07-26 01:47:36
【问题描述】:
我正在使用 git-deploy Ruby gem 将应用程序交付到登台服务器。使用 SSH 密钥执行部署。
在我的after_push 脚本中,我想用sudo 运行一个命令,该命令随后会询问我的密码,因为 sudo 权限是有限的(没有密码就无法运行 sudo)。
实际上我的 sudo 命令失败了:
sudo: no tty present and no askpass program specified
我已经尝试添加一个 askpass 程序并根据 git 手册指定它。
如何在 git-push 进程中打开 TTY 以在我的 after_push 脚本中执行交互式命令?
【问题讨论】:
标签: ssh githooks git-push post-commit