Meteor 项目部署和 mup 设置命令给出 "sshpass required for password based authentication" 错误

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

我正在尝试部署一个基于 Meteor 的项目。我在服务器上使用 nitrous.io,数字海洋,在 MongoDB.

上使用 compose.io

我已经想完成我的部署并运行 "mup setup" 命令并收到此消息:

Meteor Up: Production Quality Meteor Deployments


sshpass required for password based authentication

尝试从此处 http://git.io/_vHbvQ 安装 sshpass 并运行命令 "apt-get install sshpass" 后,我遇到了以下错误:

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?

我还尝试了另一种方法来安装 sshpass(也在此处描述 http://git.io/_vHbvQ),方法是创建文件夹配置:

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.

配置文件夹的位置是这样的: ~/workspace/MeteorProject/configure/sshpass-1.05

我的 mup.json 文件如下所示:

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

我只是总结@Akshat 解释的内容(特别感谢@Akshat 的帮助)

root 访问和 apt-get 目前在 nitrous.io

中不提供

为了解决这个问题,您需要创建私钥来验证您的服务器。 Hare 解释了如何做:digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2

创建私钥后,您需要将 mup.json 配置为使用 keyfile/pem(可能您有评论,只需删除评论符号)而不是密码,并确保注释掉密码。

就这些!