| Q | A
| ----------------- | ---
| Issue Type | Bug
| Deployer Version | @dev 9adaa6f72eadff57ec40dbbe972d8cdb1e2112cf
| Local Machine OS | Win10
| Remote Machine OS | Ubuntu 16.04
Deploy does not work
vendor\bin\dep d --roles singapore -vvv
褌挟写 Executing task enum
11.22.33.44/sitename.com-singapore
褌袗胁 done on [11.22.33.44/sitename.com-singapore]
褌鞋肖 Ok [2ms]
褌挟写 Executing task deploy:prepare
[11.22.33.44/sitename.com-singapore] > echo $0
[11.22.33.44/sitename.com-singapore] < ssh multiplexing initialization
[11.22.33.44/sitename.com-singapore] < Host key verification failed.
[Deployer\Exception\RuntimeException (-1)]
The command "echo $0" failed.
Exit Code: -1 (Unknown error)
Host Name: 11.22.33.44/sitename.com-singapore
================
Host key verification failed.
deploy.phphost("$instance_ip/$site_name-$instance_name")
->set('deploy_path', "/var/www/$site_name")
->set('site_name', $site_name)
->stage('prod')
->roles(
'prod',
'all',
$instance_ip,
$instance_name,
$site_name
)
->user('deploy')
->identityFile($deploy_public_key, $deploy_private_key, $deploy_pass_phrase);
I guess that's because you broke perfectly fine ->identityFile(), now it just gets single string "identityFile". (I guess that would be "private key", way to name things)
Your manual says Best practice is to leave connecting information for hosts in ~/.ssh/config file. That way your allow different users connect in different way. https://github.com/deployphp/docs/blob/master/hosts.md
What is bad practice then? How can I specify connection information right from the code?
I am on windows here, I would love to ->forwardAgent and other fancy stuff like that, but that doesn't work well. At least as far as my knowledge goes https://github.com/deployphp/deployer/issues/808
Where do I specify passphrase now?
Even when passphrase is empty, deploy still does not work,
->user('root')
->identityFile($root_private_key);
same error.
I guess it's not functional on Windows?
What is bad practice then?
Best practice is to leave connecting information for hosts in ~/.ssh/config file. That way your allow different users connect in different way.
How can I specify connection information right from the code?
Docs here: https://github.com/deployphp/docs/blob/master/hosts.md
Where do I specify passphrase now?
Nowhere, deployer will ask you for passphare on deploy. Or use empty passphrase.
I have read this docs over many times, I may as well post it here, it wouldn't help.
How exactly do I connect to 'sitename.com' as 'root' with private key 'c:Users\dima.ssh\id_rsa' and passphrase 'testpassword'?
There is a way to set username, a way to set private key file, there's even a way to set forwardagent, but I found no place to set passphrase.
Let's simplify the task. My private keyfile, which works with v3.3, have no passphrase. I'm setting it and username. Deployer still fails on key host auth. How do I make it work?
This is a question I have asked in the initial issue text, I have provided code example. You are just silently closing it, without any answers.
DEPLOYER DOESN"T WORK, HELLP!
deployer doesn't ask for passphrase, neither does it work with keyfile with empty passphrase. Nor does it asks for password on deploy. It asked password on dep ssh, and it worked indeed.
Try to use bash on win: https://msdn.microsoft.com/en-us/commandline/wsl/about
Deployer uses unit pipes.
Most helpful comment
Try to use bash on win: https://msdn.microsoft.com/en-us/commandline/wsl/about
Deployer uses unit pipes.