Capistrano部署权限问题
我正在尝试使用 Capistrano 2.5.19
部署我的 Sinatra
应用程序。到目前为止,我成功运行了 deploy:setup
,但是当我尝试执行实际部署或检查 (deploy:check
) 时,Capistrano 告诉我我不这样做没有权限。我使用 sudo 是因为我使用自己的用户登录,并且用于部署的用户称为 passenger
并且是 www-data
组的成员。因此将 :runner
和 :admin_runner
设置为 passenger
。然而,Capistrano 在部署过程中似乎没有使用 sudo,而在设置过程中确实这样做了 (deploy:setup
)。这是为什么?我以为是使用runner
参数指定的用户来进行部署的。
I'm trying to use Capistrano 2.5.19
to deploy my Sinatra
application. So far, I managed to successfully run deploy:setup
, but when I try to perform the actual deployment or the check (deploy:check
), Capistrano tells me that I don't have permission. I'm using sudo since I log in with my own user and the user used for deployment is called passenger
and is member of the group www-data
. Therefore is set :runner
and :admin_runner
to passenger
. It seems, however, that Capistrano is not using sudo
during the deployment, while it was definitively doing so during the setup (deploy:setup
). Why is that? I thought that the user specified by the runner
parameter is used for deployment.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,我不能直接回答你的问题,但是,我想提供一个不同的解决方案,那就是花时间正确设置 ssh/rsa 密钥来完成你想做的事情。这将使您不必担心设置和更改用户,也不必担心在 cap 脚本中嵌入身份验证信息。
Unfortunately, I cannot directly answer your questions, however, I would like to offer up a different solution, which is to take the time to properly set up ssh/rsa keys to accomplish what you want to do. This will allow you to both not worry about setting and changing users in addition to not having to worry about embedding authentication information inside your cap scripts.