Take the 2-minute tour ×
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.

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

1 Answer 1

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

 
discard

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.