Hi,
I am trying to set up capistrano with github so that I can deploy from my windows XP laptop to my ubuntu server. Capistrano gives the following output when I run cap deploy:
$ cap deploy
* executing `deploy'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote [email protected]:xxxx/cc.git master"
* executing "if [ -d /var/www/cc/shared/cached-copy ]; then cd /var/www/cc/sha
red/cached-copy && git fetch origin && git reset --hard d1e6adf8d27597c3a6b17a
3bb78f136d03e47a45 && git clean -d -x -f; else git clone [email protected]:xxxx/cc.git
/var/www/ cc/shared/cached-copy && cd /var/www/cc/shared/cached-copy &&
git checkout -b deploy d1e6adf8d27597c3a6b17a3bb78f136d03e47a45; fi"
servers: ["XXX.com"]
[XXX.com] executing command
** [XXX.com :: out] Cloning into /var/www/fx/shared/cached-
copy...
** [XXX.com :: err] Permission denied (publickey).
** [XXX.com :: err] fatal: The remote end hung up unexpecte
dly
After some looking around, I read that I should first try to do a simple SSH connection from my laptop to the server. This also gives a public key error:
Permission denied (publickey).
If I use the -l option (with my user ID on the server) then I can logon via SSH. I guess this is because my username on my laptop (and public key) are different than the user name on the server.
I have the
set :user, 'server_user_name'
option set in deploy.rb, but this doesn't seem to be enough, I guess it's because the user name on my public key, (which is the same as my laptop username) is not the same as my 'server_user_name'.
Any ideas on how to get around this?
Thanks