Articles of capistrano

即使我设置了ssh密钥,capistrano仍然要求提供第一个密码?

背景:我已经设置了一个SSH密钥,以避免使用密码与卡皮斯特拉诺每个http://www.picky-ricky.com/2009/01/ssh-keys-with-capistrano.html 。 一个基本的SSH到我的服务器确实工作正常,而不要求密码。 我正在使用“dreamhost.com”进行托pipe。 问题 – 当我运行'cap deploy'时,我仍然被要求input第一个密码(即使之前的第二个和第三个密码请求现在是自动的)。 它是以“git clone – q ssh:…..”开头的capistrano命令,其密码正在被请求。 问题 – 我有没有错过? 我怎样才能得到“帽部署”完全无密码? 从config / deploy.rb中的一些出色的是: set :use_sudo, false ssh_options[:keys] = [File.join(ENV["HOME"], ".ssh", "id_rsa")] default_run_options[:pty] = true 谢谢 PS。 服务器上的权限是: drwx—— 2 mylogin pg840652 4096 2010-02-22 15:56 .ssh -rw——- 1 mylogin pg840652 404 2010-02-22 15:45 authorized_keys

Capistrano需要root密码才能部署 – 不好

我正在使用Capistrano部署到我的VPS(Ubuntu的Linode),似乎需要我的root用户的密码才能完成部分部署。 这是不好的,因为我看到它。 (我与nginx和乘客滚动。) 我recursion地部署目录和git仓库。 我的deploy.rb文件中唯一的exception是我运行bundle install和rake db:在deploy:update_code之后进行迁移。 下面是从部署相对(我相信)到根密码请求的输出: * executing `deploy' * executing `deploy:update' ** transaction: start * executing `deploy:update_code' updating the cached checkout on all servers executing locally: "git ls-remote deploy@mydomain:~/myapp.git master" * executing "if [ -d /home/apps/myapp/shared/cached-copy ]; then cd /home/apps/myapp/shared/cached-copy && git fetch origin && git reset –hard 8ea422656949f90cc27fd17cb31d68bbaeb33c6e && git clean […]

Capistrano + Nginx + Passenger = 403

我也问过在stackoverflow,但仍然没有收到任何帮助我解决这个问题的答案。 为了解决这个问题,我花了差不多一个星期的时间,而且我还没有取得任何进展。 看来这个问题很常见,但是我在网上find的解决scheme都没有为我工作。 我的一个好友实际上正在创造相同的设置,而他也有同样的问题。 经过几天的403错误,我开始使用这个教程: http : //blog.ninjahideout.com/posts/a-guide-to-a-nginx-passenger-and-rvm-server 我曾希望从头开始使用本教程将工作,但没有骰子。 无论哪种方式,如果您查看教程,您可以看到我采取了哪些步骤。 这基本上是我正在做的事情。 我在linode.com上有一个VPS账户 服务器操作系统是Ubuntu 10.04 雪豹10.6.6本地操作系统(应该不会有问题,但只是你知道)用于部署与Capistrano 我在服务器上使用RVM 。 版本是1.2.2 我之前在ruby-1.9.2-p0 [i386]上,但根据上面列出的教程,我切换到了ree-1.8.7-2010.02 [i386] 。 从命令行运行' ruby 'validation我使用的是1.8.7,输出如下: /usr/local/rvm/rubies/ree-1.8.7-2010.02/bin/ruby 乘客-v打印以下内容: Phusion Passenger版本3.0.2 运行'nginx -v'会给我一个消息,说明命令nginx找不到。 服务器肯定在那里,正在运行,我可以使用nginx来提供静态文件,但这可能与我的问题有关。 我有两个用户处理安装。 我用来安装所有东西的根目录 ,以及部署我的应用程序的用户 我的web app目录位于部署者用户的主目录中,如下所示: /home/deployer/webapps/mysite.com/public 按照Capistrano默认部署,在公用文件夹中创build一个名为current的符号链接 ,并指向/home/deployer/webapps/mysite.com/public/releases/most_current_release 我已经recursion地将部署者目录chmod到777 / opt / nginx权限: rwxr-xr-x /usr/local/rvm/gems/ree-1.8.7-2010.02/gems/passenger-3.0.2权限: rwxrwsrwx 我的nginxconfiguration文件已经经历了短暂的永恒变化,但目前看起来像这样: ================================================== ================================ worker_processes 1; events { […]

Capistrano部署到VPS失败

我正在使用Capistrano将Ruby on Rails应用程序部署到运行Ubuntu 11.10的VPS。 但是,每当我运行cap:部署我得到这个错误: cd: 1: can't cd to /var/www/appname/releases 我正在使用的VPS是Linode。 本地,我在Mac OS X 10.7.2狮子。 另外,我使用的是git,Passenger和Ngninx,尽pipe我不认为这有什么不同,但我认为这与文件夹权限和SSH有关。 这是deploy.rb set :user, "name" set :application, "appname" set :domain, "000.000.201.001" set :repository, "." set :use_sudo, true set :deploy_to, "/var/www/#{application}" set :scm, "none" set :deploy_via, :copy role :app, domain role :web, domain role :db, domain, :primary => true namespace […]

Ruby on Rails / Passenger with Apache2 – build立子域

我正在尝试configurationApache2和mod_passenger,以便我可以在服务器example.com/另一个站点以及example.com/另一个完全不同的rails实例。 我的<VirtualHost>上下文看起来像这样到目前为止: <VirtualHost *:80> # Name ServerName server.biz DocumentRoot /var/rails/current/public <Directory /var/rails/current/public> AllowOverride all Options -MultiViews </Directory> # Logfile ErrorLog /var/log/apache2/server.biz.error.log CustomLog /var/log/apache2/server.biz.access.log combined </VirtualHost> 如果任何人有任何想法,我怎么能做到这一点,甚至完全不同的方法来做到这一点,将不胜感激。

与capistrano进行部署的正确方法

我期待与卡皮斯特拉诺部署的良好做法。 我想从一个简短的描述开始,我是如何进行部署的。 capistrano在本地安装在开发人员的电脑上。 我用capistrano选项部署思想网关:gateway 。 首先,我认为与:gateway选项我需要只有网关主机的SSH连接,但事实certificate,我需要ssh连接( 公钥 )所有主机,我想部署到。 我想find一个方便和安全的方式来部署应用程序。 例如,如果新开发人员开始工作,将public_key仅放在网关服务器上,而不放在所有应用程序服务器上方便得多。 另一方面,我不希望他与服务器有任何连接,特别是ssh到gateway,只是因为他是开发人员,他只需要部​​署。 如果您知道与卡皮斯特拉诺部署的良好做法,请告诉我们。

Capistrano壳牌环境错误

我试图让卡皮斯特拉诺与rvm和乘客独立合作。 我曾经有过这样的工作,然后卡皮斯特拉诺突然开始抱怨错过了捆绑命令。 当我删除require 'bundler/capistrano' ,它不再抱怨丢失的包(并且不再尝试捆绑),但是会失败,如下所示: … * 2013-07-25 14:29:16 executing `deploy:restart' * executing "if [[ -f /home/staging/capistrano/shared/tmp/pids/passenger.80.pid ]];\\\n then\\\n cd /home/staging/capistrano/current && rvmsudo passenger stop -p 80;\\\n fi" servers: ["ccdev.dyndns.org"] [ccdev.dyndns.org] executing command ** [out :: ccdev.dyndns.org] sh: 1: ** [out :: ccdev.dyndns.org] [[: not found ** [out :: ccdev.dyndns.org] command finished in 13ms * […]

Apache网站文件没有域名

我似乎无法在谷歌上find这个。 我试图搭build一个使用EC2和Elastic IP的快速testing网站,但是我陷入了如何编辑Apache网站文件,以便我可以查看该网站。 它被部署在/ var / www / ServerTest目录中,我想用Elastic IP来访问它(让我们来说我想做56.34.123.12/index.html)。 我怎么能设置? 以下是我迄今为止在网上find的内容: <VirtualHost *:80> ServerName www.example.com DocumentRoot /webapps/mycook/ServerTest <Directory /webapps/mycook/ServerTest> Allow from all Options -MultiViews </Directory> </VirtualHost> 但是,我没有像“www.example.com”这样的域名来链接它。 谢谢!

Nginx:将httpredirect到https

我知道这个问题已经被无数次的问到了。 仍然不能让我的工作与我目前看到的答案。 我试图强制redirecthttp到https与nginx。 当我访问https // subdomain.example.com时,一切正常,但访问http://subdomain.example.com给了我 "This Webpage has a redirect loop" 我试过了 rewrite ^(.*) https://$host$1 permanent; 和 return 301 https://www.mydomain.com$request_uri; 试着 proxy_set_header X-Forwarded-Proto $scheme; 没有解决这个问题。 请问我该如何解决这个无限循环问题? 这是我的nginx.conf upstream unicorn { server unix:/tmp/unicorn.example.sock fail_timeout=0; } server { server_name subdomain.example.com; listen 80; return 301 https://$host$request_uri; root /home/deploy/apps/example/current/public; location ^~ /assets/ { gzip_static on; expires max; add_header […]

卡皮斯特拉诺3挂在git:检查

我试图部署到一个新的Ubuntu 14.04框与cap staging deploy ,但capistrano挂在git:check任务: GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/<app_name>/git-ssh.sh /usr/bin/env git ls-remote –heads [email protected]:<github_user>/<app_name> 为什么发生这种情况?