Deployer: Still trying to make v5 work

Created on 13 Apr 2017  路  4Comments  路  Source: deployphp/deployer

| Q | A
| ----------------- | ---
| Issue Type | Bug
| Deployer Version | @dev 9adaa6f72eadff57ec40dbbe972d8cdb1e2112cf
| Local Machine OS | Win10
| Remote Machine OS | Ubuntu 16.04

Description

Deploy does not work

Steps to reproduce

  1. set everything up, finally!
  2. keys and passphrases that work for dep v.3.3 doesn't work, error: http://4.stefantsov.com/s/2017.04.13_15.19.49_hp3oay3n.png
  3. setting ssh_multiplexing false changes nothing, whatever it is.
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.

Content of deploy.php

host("$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?

Most helpful comment

Try to use bash on win: https://msdn.microsoft.com/en-us/commandline/wsl/about
Deployer uses unit pipes.

All 4 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

khoanguyen96 picture khoanguyen96  路  5Comments

lsv picture lsv  路  4Comments

antonmedv picture antonmedv  路  5Comments

k-solnushkin picture k-solnushkin  路  5Comments

chouex picture chouex  路  4Comments