question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sudo: no tty present and no askpass program specified

See original GitHub issue

Not sure how this can be fixed.

I get this after mup setup.

Started TaskList: Setup Docker
[10.0.2.51] - setup docker
[10.0.2.52] - setup docker
[10.0.2.51] - setup docker: SUCCESS
[10.0.2.52] - setup docker: SUCCESS

Started TaskList: Setup Meteor
[10.0.2.51] - Setup Environment
To use mup inbuilt mongodb setup, you should have both meteor app and mongodb on the same server
[10.0.2.51] x Setup Environment: FAILED


        -----------------------------------STDERR-----------------------------------
        sudo: no tty present and no askpass program specified
        sudo: no tty present and no askpass program specified
        sudo: no tty present and no askpass program specified
        sudo: no tty present and no askpass program specified
        -----------------------------------STDOUT-----------------------------------
        ----------------------------------------------------------------------------

My setup file specify two servers… I haven’t changed much from the the default settings, apart from specifying credentials and app info/path.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

12reactions
yanickrochoncommented, Nov 7, 2016

Deployment

Local

  • Generate local SSH key if needed

    $ mkdir ~/.ssh
    $ chmod 700 ~/.ssh
    $ ssh-keygen -t rsa
    
  • Copy the SSH id over to the server (replace user by the specified user login)

    $ ssh-copy-id user@x.x.x.x
    
  • Test login (it should not prompt for password now) (replace user by the specified user login)

    $ ssh user@x.x.x.x
    

Remote

  • Remove password from sudoers

    $ sudo visudo
    
  • Add this line at the bottom of the file (replace user by the specified user login)

    user ALL=(ALL) NOPASSWD: ALL
    
  • Install docker on all servers

    $ sudo apt install docker docker.io
    
  • Exit

    $ exit
    

Local (again)

  • Setup if necessary, etc.

    $ cd /path/to/project
    
    $ npm i -g mupx
    
    $ mkdir .deploy
    
    $ cd .deploy
    
    $ mup setup
    
    $ mup deploy
    

Note: Now, I have a deployment failure, but no error. The TCP port is open, but the app can’t be accessed. Moving on to other issues…

4reactions
dbejarano32commented, Nov 21, 2018

You should change this line, in sudoers file (sudo visudo) %sudo ALL=(ALL:ALL) ALL

by this: %sudo ALL=(ALL) NOPASSWD:ALL

and solved problem!

Read more comments on GitHub >

github_iconTop Results From Across the Web

sudo: no tty present and no askpass program specified
The error message sudo: no tty present and no askpass program specified will occur when the sudo command is trying to execute a...
Read more >
How to fix 'sudo: no tty present and no askpass program ...
The issue is caused by executing a sudo command which tries to request for a password, but sudo does not have access to...
Read more >
Linux error 'sudo: no tty present and no askpass program ...
It's important to note that this error occurs when a user with no superuser privileges tries to execute a command with sudo. ......
Read more >
“sudo: no tty present and no askpass program specified”.
The “sudo: no tty present and no askpass program specified” issue occurs when the sudo is used but password is not read. It...
Read more >
sudo: no tty present and no askpass program specified
It works because sudo requires a tty to prompt for a password, and when specifying commands to run to ssh , it doesn't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found