Capistrano Git SSH problem

Hi, I am using Capistrano for deployment. And bitnami in my ec2 linux instance. I have configured Capistrano for deployment and deploy:check says all is fine. But I am facing problem while doing deploy. Here is the full stack

$ cap deploy:check

triggering load callbacks

  • 2013-06-26 08:38:11 executing `staging’

triggering start callbacks for `deploy:check’

  • 2013-06-26 08:38:11 executing `multistage:ensure’

  • 2013-06-26 08:38:11 executing `deploy:check’

  • executing “test -d /var/www/app/releases”

servers: [“54.227.250.222”]

[54.227.250.222] executing command

command finished in 705ms

  • executing “test -w /var/www/app”

servers: [“54.227.250.222”]

[54.227.250.222] executing command

command finished in 710ms

  • executing “test -w /var/www/app/releases”

servers: [“54.227.250.222”]

[54.227.250.222] executing command

command finished in 697ms

  • executing “which git”

servers: [“54.227.250.222”]

[54.227.250.222] executing command

command finished in 702ms

You appear to have all necessary dependencies installed

$ cap staging deploy

triggering load callbacks

  • 2013-06-26 08:38:49 executing `staging’

triggering start callbacks for `deploy’

  • 2013-06-26 08:38:49 executing `multistage:ensure’

  • 2013-06-26 08:38:49 executing `deploy’

triggering before callbacks for `deploy’

  • 2013-06-26 08:38:49 executing `check_production’

  • 2013-06-26 08:38:49 executing `deploy:update’

** transaction: start

  • 2013-06-26 08:38:49 executing `deploy:update_code’

executing locally: “git ls-remote git@github.com:abc/abc.git master”

Permission denied (publickey).

fatal: The remote end hung up unexpectedly

*** [deploy:update_code] rolling back

  • executing “rm -rf /var/www/app/releases/20130626030853; true”

servers: [“54.227.250.222”]

[54.227.250.222] executing command

command finished in 738ms

Command git ls-remote git@github.com:abc/abc.git master returned status code pid 19398 exit 128

I have checked and get to know that it is git configuration problem. I want to confirm that it is not capsitrano problem ? Do I really need to do git ssh configuration in my ec2 instance ?

Thanks.

Hi,