与Capistrano的使用PEM文件部署 [英] deploy with capistrano using a pem file

查看:136
本文介绍了与Capistrano的使用PEM文件部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个EC2实例,我们的Capistrano的安装需要SSH。通过SSH连接正常,我用一个.pem文件连接到服务器。如何使用Capistrano的部署时,我利用这个.pem文件?

We have a EC2 instance, and our capistrano setup requires ssh. To connect through ssh normally, I use a .pem file for connecting to the server. how do I utilize this .pem file when using capistrano to deploy?

推荐答案

deploy.rb ,设置这些configuraition值:

In deploy.rb, set these configuraition values:

default_run_options[:pty] = true
ssh_options[:forward_agent] = true
ssh_options[:auth_methods] = ["publickey"]
ssh_options[:keys] = ["/path/to/key.pem"]

这篇关于与Capistrano的使用PEM文件部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆