0

Trying to use Envoy via Vagrant (Homestead) to deploy to a server on EC2 that I would normally use a .PEM file when I SSH into it.

When using: @servers(['web' => 'ec2-user@myserver.com']) in my Envoy.blade.php

I get: Permission denied (publickey).

Any help would be huge!

pete
  • 1,023
  • 1
  • 10
  • 15
  • The solution in here: http://stackoverflow.com/a/24590617/3813797 – Deivide Jan 29 '16 at 16:58
  • Possible duplicate of [Laravel "envoy run" command not working with ssh key](http://stackoverflow.com/questions/24562774/laravel-envoy-run-command-not-working-with-ssh-key) – Deivide Jun 24 '16 at 18:48

1 Answers1

-1

Answer is here: https://stackoverflow.com/a/32088143/13346162

You need to pass the -A (as per the man page it - Enables forwarding of the authentication agent connection. This can also be specified on a per-host basis in a configuration file) in you ssh string.

You will also need add your ssh key for agent forwarding (on the machine which can access the git remote which I assume be your localhost)

ssh-add -K ~/.ssh/your_private_key

Something like this

@servers(['web' => '-A user@domain.com'])

@task('deploy')
 cd /path/to/site
 git status
@endtask

Git remote commands should now work.