EasyCorp / easy-deploy-bundle

The easiest way to deploy your Symfony applications
https://easycorp.io/EasyDeploy
MIT License
471 stars 103 forks source link

Permission denied #55

Open floran974 opened 6 years ago

floran974 commented 6 years ago

Hi,

when I try to execute php bin/console deploy,

I have this error :

' The command "(export SYMFONY_ENV=prod; cd /home/gbdd/SandBox/deploy-test && git ls-remote git@gitlab.com:GBDD/AAA.git master)" failed.

Exit Code: 128(Invalid exit argument)

Working directory: /home/gbdd/SandBox/deploy-test

Permission denied (publickey).

fatal: Could not read from remote repository.'

But I think I have Permission because when I execute git ls-remote git@gitlab.com:GBDD/AAA.git master on my console it's work.

Thank s for your help

YetiCGN commented 6 years ago

Is the SSH key automatically loaded or do you have to add it to the ssh-agent manually? Is it password-protected for example?

dachinat commented 6 years ago

Maybe this is because hostname should be in known_hosts on server

Marcelo-Petrucelli commented 5 years ago

I may be pretty late, but you also have to be sure that you have an SSH agent running in your local machine and that you've added the key to it by using ssh-add command.

After many hours, that's what was causing my problem: The server and my local machine had the correct configuration with ForwardAgent and AllowAgentForwarding, I was using useSshAgentForwarding from the bundle and everything was right, but my ssh key was never forwarded because it was not running on an ssh agent.