Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to push a git commit from my laptop to my server but keep getting the following error message:

remote: sudo: no tty present and no askpass program specified 
To ssh://git@example.com/~/site_hub

I have the following in my sudoers:

Defaults:git !requiretty
git ALL=(apache) NOPASSWD: /usr/bin/git

Not sure why I'm getting that error message. I've Googled around but I'm not finding the solution.

share|improve this question

ssh does not always open a (pseudo) tty. This may be the case here. tty allocation can be enforced though: ssh -t or even ssh -tt. If you cannot pass command line arguments then you can do the same via the config file: RequestTTY yes or RequestTTY force, see man ssh_config.

share|improve this answer
The ssh is through a Win Vista laptop git pgm (msysGit) to a CentOS server. Guess I'll have to see if I can make those changes on the Win end. – Ian Apr 13 '13 at 5:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.