Search code examples
mongodbdeploymentmeteormeteor-upsshpass

Meteor project deployment and mup setup command give "sshpass required for password based authentication" error


I am trying to deploy a Meteor based project. I'm using nitrous.io, digital ocean for the server, and compose.io for MongoDB.

I already wanted to finish my deployment and run the "mup setup" command and had got this message:

Meteor Up: Production Quality Meteor Deployments


sshpass required for password based authentication

After trying to install sshpass from here http://git.io/_vHbvQ, and running the command "apt-get install sshpass" I have got the following errors:

E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

I also tried another way to install sshpass (also described here http://git.io/_vHbvQ) by creating the folder configure:

action@steady-meteor-55-179639:~/workspace/MeteorProject/configure$ sudo make install

----- WARNING: sudo access is not available; running without sudo.

----- make: *** No rule to make target install'. Stop.
action@steady-meteor-55-179639:~/workspace/MeteorProject/configure$ make install
make: *** No rule to make target
install'. Stop.

Configure folder is located in this way: ~/workspace/MeteorProject/configure/sshpass-1.05

My mup.json file looks like this:

{
  // Server authentication info
  "servers": [
    {
      "host": "XXX.XXX.XX.XX",
      "username": "root",
      "password": "123456789"
      // or pem file (ssh based authentication)
      //"pem": "~/.ssh/id_rsa"
    }
  ],

Solution

  • I just will conclude what @Akshat explained (special thanks to @Akshat for his help)

    root access and apt-get isn't offered at this time in nitrous.io

    In order to solve this problem, you need to create private key to authenticate to your server. Hare explained how doing it: digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2

    After you created private keys, you need to configure your mup.json to use the keyfile/pem (which probably you have as a comment, just delete comment signs) instead of the password and be sure to comment the password out.

    That is all!