-1

I have my git repo on my shared dreamhost account.

this works well when I push from my local machine. it will ask for my password.

I can also login to my production server(at Digital Ocean) and clone this repository.

But when i try to use Capistrano to deploy i get this error

DEBUG [0d6a00ed]    Permission denied (publickey,password).
DEBUG [0d6a00ed]    fatal: The remote end hung up unexpectedly

UPDATE:

I searched for this error and seen many other similar questions and answers. Most of them is connected to the github and how one should upload the ssh key to solve it. But since i am already able to clone the repo from the server command line I don´t see how this is the problem. But I am new to using Capistrano so what do i know

Jepzen
  • 2,942
  • 6
  • 40
  • 62

1 Answers1

1

Well so I generated a ssh key on the server. Then uploaded this key to the dreamhost server like this

 cat .ssh/id_rsa.pub | ssh user@domain.tld 'cat >> .ssh/authorized_keys'

(thanks to this http://casperfabricius.com/site/2008/09/21/keeping-git-repositories-on-dreamhost-using-ssh/)

And voila it works.

I guess the solution was right there all the time. I just don't understand why I can clone it from the command line without having a ssh key but need one when using Capistrano? If anyone can explain that it would be great

Jepzen
  • 2,942
  • 6
  • 40
  • 62