0

我正在尝试使用橡胶部署 Amazon EC2 实例。在运行 cap Rubber:create_staging 我得到以下超时:

  * 2014-04-06 20:14:09 executing `rubber:postgresql:setup_apt_sources'
    servers: ["production.foo.com"]
 ** sftp upload #<StringIO:0x0000000420a748> -> /tmp/configure_postgresql_repository
    [production.foo.com] /tmp/configure_postgresql_repository
    [production.foo.com] done
  * sftp upload complete
  * executing "sudo -p 'sudo password: '  bash -l /tmp/configure_postgresql_repository"
    servers: ["production.foo.com"]
    [production.foo.com] executing command
    command finished in 1161ms
  * executing "sudo -p 'sudo password: '  bash -l -c 'apt-get -q update'"
    servers: ["production.foo.com"]
connection failed for: production.foo.com (Timeout::Error: execution expired)

我尝试将超时时间增加到 60 秒,但没有奏效。有什么建议么?

4

1 回答 1

0

看起来您用来使用 Rubber/Capistrano 连接到实例的用户没有passwordlesssudo 访问权限。尝试/etc/sudoers.d/90-user-you-use-for-rubber使用以下内容创建文件:

user-you-user-for-rubber  ALL=(ALL) NOPASSWD:ALL
于 2014-04-07T01:03:53.340 回答