Why is a cap deploy giving Permission denied (publickey)?
I had to do the following: $ ssh-add -D #remove existing identities $ ssh-agent #copy the lines & run them $ ssh-add #uses the output from above
I had to do the following: $ ssh-add -D #remove existing identities $ ssh-agent #copy the lines & run them $ ssh-add #uses the output from above
The simplest way is to just append true to the end of your command. task :my_task do run “my_command” end Becomes task :my_task do run “my_command; true” end
Folders inside your app are symlinks to folders in the shared directory. If your app writes to log/production.log, it will actually write to ../shared/log/production.log. That’s how the files end up being in the shared folder. You can see how this works by looking at the feature specs or tests in Capistrano. If you want to … Read more
UPDATE: For RVM >= 1.11.3, you should now just use the rvm-capistrano gem. For older RVM >= 1.0.1, the answer below still applies. ORIGINAL ANSWER: Okay, though I still haven’t gotten a full cap deploy to work, I did fix this problem. The problem was Capistrano trying to use a different path for Bundler (and … Read more
That’s easy: set :scm, :none set :repository, “.” set :deploy_via, :copy Simply run Capistrano from the root of your project.
Figured it out! Apparently this issue was with net-ssh gem. I had version 2.8.0 installed recently with some updates to my development environment and was the cause. I’m not sure why it was failing, but gem uninstall net-ssh -v 2.8.0< fixed it for me. If anyone actually knows why this was an issue or how … Read more
It occurs that config/deploy.rb has lock ‘3.1.0’. It was enough to change it to ‘3.2.0’ and now it’s working.
The best option is to use Apache configuration. Using htaccess or global configuration depends mainly on if you control your server. If you do, you can use something like <DirectoryMatch .*\.svn/.*> Deny From All </DirectoryMatch> If you don’t, you can do something similar in .htaccess files with FilesMatch
Executing ssh-add ~/.ssh/id_rsa in my local machine fixed the issue for me. It seemed that the ssh command line tool wasn’t detecting my identity when called with Capistrano.
I ended up posting a question on the capistrano users list here, and got the following response from Jamis (edited a bit by me here for clarity): Try the HOSTS environment variable: cap HOSTS=app2.example.com production deploy Note that doing this will treat app2 as being in every role, not just whichever role(s) it happens to … Read more