Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8290807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:55:09+00:00 2026-06-08T12:55:09+00:00

I am using the git-deploy Ruby gem to deliver an application to the staging

  • 0

I am using the git-deploy Ruby gem to deliver an application to the staging server. The deployment is performed with SSH keys.

In my after_push script I want to run a command with sudo, which subsequently asks for my password, since sudo rights are limited (can’t run sudo without password).

Effectively my sudo command fails with:

sudo: no tty present and no askpass program specified

I’ve tried adding an askpass program and specifying it according to the git manual.

How can I open a TTY in the git-push process for interactive commands in my after_push script?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T12:55:11+00:00Added an answer on June 8, 2026 at 12:55 pm

    So far it seems what I am seeking is not possible. There is no tty available, is what I gather from reading Query on setting up a pre-receive hook in git and Is it possible to accept user input as part of a remote git post-receive hook?

    Any better suggestions for how to perform password protected sudo operations in post-receive?

    UPDATE: The answer was found in How do I prompt the user from within a commit-msg hook?

    It is not possible to do what I’ve tried to achieve here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using capistrano with git to deploy a RoR project. After deployment, the
I am using Ruby on Rails, the Capistrano gem and git. Long time ago
I'm trying to deploy my rails application by using Passenger and Capistrano on Dreamhost.
I am using Capistrano to deploy a ruby on rails project. I am attempting
I am using capistrano to deploy my rails application. I want to override the
I have a Ruby on Rails 3.2 app using bundler and capistrano for deployment.
I'm using git-svn to use git locally and deploy a client's svn repo. However,
I'm trying to deploy a Rails3 application, for the 1st time, to Dreamhost using
I created centralized git repositories on my department's sun solaris server using mkdir /var/git/myapp.git
Is it possible to deploy a website using git push ? I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.