ruby on rails - Amazon EC2 + Capistrano + Git: Permission denied (publickey) -


when deploy rails app amazon ec2 server using capistrano, get

** [ip.compute-1.amazonaws.com :: out] permission denied (publickey). ** [ip.compute-1.amazonaws.com :: out] fatal: remote end hung unexpectedly 

while executing the

git clone 

command.

i think has github keys, don't know how set up. grateful every advise!

thanks!

edit:

i generated new key on github, put id_rsa.pub , on ec2 server created file .ssh/authorized_keys key, still doesn't work.

what's wrong that?

to use ssh agent:

ssh_options[:forward_agent] = true 

to use pem file:

ssh_options[:auth_methods] = ["publickey"] ssh_options[:keys] = ["/path/to/file.pem"] 

to enable agent in local

$ ssh-add 

you have execute command each time, don't know scope of 'each time', added ssh-add run each time open new tab in terminal echo ssh-add >> ~/.bashrc, depending in os , configuration.

the process, far understand this:

  1. you have ssh-agent in local
  2. you connect server deploying pem file, ssh, time through capistrano
  3. remote server uses agent use key checkout git repo inside deploy machine.

Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -