Search code examples
ruby-on-railsdeploymentbitbucketlinode

Deploying ROR application to Linode.com using Capistrano 3.1 from Bitbucket repository


There is ROR application, hosted on Linode.com, source code is hosted on Bitbucket.org. For deploying my ROR app Capistrano 3.1 is used. When I execute following command:

cap production git:check

everything is fine, connection can be established, but when I try to call

cap production deploy

it returns error when fetching from origin

Command: cd /home/user/app/repo && /usr/bin/env git remote update
Fetching origin
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
error: Could not fetch origin

Any help is much appreciated.


Solution

  • Resolved the problem after installing SSH client and server, setting up security keys. Great utility, which can be used to diagnose SSH problems is https://github.com/capistrano-plugins/capistrano-ssh-doctor thanks for creator! Cheers.