Deploy fails with Permission denied (publickey)

525 views
Skip to first unread message

d...@html24.net

unread,
May 15, 2014, 3:52:48 AM5/15/14
to capis...@googlegroups.com

I'm trying to deploy a Rails app to a VPS. The source code is hosted at BitBucket.

I keep getting

executing locally: "git ls-remote ssh://g...@bitbucket.org/HTML24DK/wdp_tuborg-cms.git master"
 
Permission denied (publickey).
 fatal
: Could not read from remote repository.
 
 
Please make sure you have the correct access rights


I have setup Capistrano to deploy with the "deploy" user and if I log in to the server myself with SSH as "deploy" and run "git ls-remote ssh://g...@bitbucket.org/HTML24DK/wdp_tuborg-cms.git master" then it works just fine.


Any suggestions?


Versions:
  • Ruby: 1.9.1
  • Capistrano: 2.15.5
  • Rails 3.1.1
  • Rake: 0.9.2.2
Platform:
  • Working on....
  • Deploying to...
Logs:
Files:

Bruno Sutic

unread,
May 15, 2014, 7:42:36 AM5/15/14
to capis...@googlegroups.com
Hi,
Is switching to Capistrano 3 an option for you?
If yes, then you might find this plugin useful - it troubleshoots this exact problem:
Here's the link: https://github.com/bruno-/capistrano-ssh-doctor (capistrano 3 only!)
Reply all
Reply to author
Forward
0 new messages