Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

locopetey's avatar

Envoy with Vagrant: Permission denied (publickey).

Hello All!

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!

0 likes
2 replies
spar_x's avatar

I'm having the same problem. When I run the envoy command manually I get prompted for the passphrase. I enter the right one but then I always get the permission denied (publickey) error. All I'm trying to do is a "ls -la" to test this process.

Did you figure out how to make it work?

ngoctp's avatar

You cannot execute "git pull" with password protected private key while running Envoy. Try to use private key without password in you remote server.

Please or to participate in this conversation.