{"action":"created","issue":{"url":"https://api.github.com/repos/deployphp/deployer/issues/655","repository_url":"https://api.github.com/repos/deployphp/deployer","labels_url":"https://api.github.com/repos/deployphp/deployer/issues/655/labels{/name}","comments_url":"https://api.github.com/repos/deployphp/deployer/issues/655/comments","events_url":"https://api.github.com/repos/deployphp/deployer/issues/655/events","html_url":"https://github.com/deployphp/deployer/issues/655","id":155275766,"number":655,"title":"Different behavior using servers.yml (Get suddenly asked for a password)","user":{"login":"dnaber-de","id":1133205,"avatar_url":"https://avatars.githubusercontent.com/u/1133205?v=3","gravatar_id":"","url":"https://api.github.com/users/dnaber-de","html_url":"https://github.com/dnaber-de","followers_url":"https://api.github.com/users/dnaber-de/followers","following_url":"https://api.github.com/users/dnaber-de/following{/other_user}","gists_url":"https://api.github.com/users/dnaber-de/gists{/gist_id}","starred_url":"https://api.github.com/users/dnaber-de/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnaber-de/subscriptions","organizations_url":"https://api.github.com/users/dnaber-de/orgs","repos_url":"https://api.github.com/users/dnaber-de/repos","events_url":"https://api.github.com/users/dnaber-de/events{/privacy}","received_events_url":"https://api.github.com/users/dnaber-de/received_events","type":"User","site_admin":false},"labels":[{"id":47395261,"url":"https://api.github.com/repos/deployphp/deployer/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/deployphp/deployer/milestones/2","html_url":"https://github.com/deployphp/deployer/milestones/v4.0","labels_url":"https://api.github.com/repos/deployphp/deployer/milestones/2/labels","id":936666,"number":2,"title":"v4.0","description":"","creator":{"login":"elfet","id":141232,"avatar_url":"https://avatars.githubusercontent.com/u/141232?v=3","gravatar_id":"","url":"https://api.github.com/users/elfet","html_url":"https://github.com/elfet","followers_url":"https://api.github.com/users/elfet/followers","following_url":"https://api.github.com/users/elfet/following{/other_user}","gists_url":"https://api.github.com/users/elfet/gists{/gist_id}","starred_url":"https://api.github.com/users/elfet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elfet/subscriptions","organizations_url":"https://api.github.com/users/elfet/orgs","repos_url":"https://api.github.com/users/elfet/repos","events_url":"https://api.github.com/users/elfet/events{/privacy}","received_events_url":"https://api.github.com/users/elfet/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":44,"state":"open","created_at":"2015-01-15T11:53:46Z","updated_at":"2016-11-07T14:13:16Z","due_on":"2017-01-31T00:00:00Z","closed_at":null},"comments":6,"created_at":"2016-05-17T14:35:26Z","updated_at":"2016-11-07T14:13:16Z","closed_at":"2016-11-07T14:13:16Z","body":"| Q | A |\n| --- | --- |\n| Issue Type | Bug |\n| Deployer Version | `master` |\n| Local Machine OS | Ubunut 14.04 LTS |\n| Remote Machine OS | N/A |\n### Description\n\nI'm using deployer with identity files to authenticate to the remote hosts, which works as expected. I don't get asked for a password, when deploying. Now that I want to exclude the servers configuration to a yaml file as described in the documentation, I get asked for a password when running `$ deb deploy …`. The deploy process continues independent of what I type in as password. \n\nI would expect that I don't get asked for a password as I don't get ask with the default way of configuring the server.\n### Steps to reproduce\n\nSee below\n### Content of `deploy.php`\n\nThis is the basic `deploy.php` with server directly defined: \n\n``` php\n<?php\nrequire 'recipe/composer.php';\n\nset( 'repository', 'git@bitbucket.org:vendor/project.git' );\nenv( 'release_name', date( 'Y-m-d-H-i-s' ) );\nset('keep_releases', 3);\n\nset( 'shared_files', [ '.env', 'robots.txt' ] );\nset( 'shared_dirs', [ 'wp-content/uploads' ] );\n\nenv('composer_options', 'install --no-dev --verbose --prefer-dist --optimize-autoloader --no-progress --no-interaction');\n\nserver( 'testing.vendor', 'myhost.de', 22 )\n    ->user( 'xxxxxx' )\n    ->identityFile( '~/.ssh/id_rsa.pub', '~/.ssh/id_rsa' )\n    ->env( 'deploy_path', '/var/www/project' )\n    ->env( 'branch', 'master' );\n```\n\nThis is the `deploy.php` with the included `servers.yml`:\n\n``` php\n<?php\nrequire 'recipe/composer.php';\n\nset( 'repository', 'git@bitbucket.org:vendor/project.git' );\nenv( 'release_name', date( 'Y-m-d-H-i-s' ) );\nset('keep_releases', 3);\n\nset( 'shared_files', [ '.env', 'robots.txt' ] );\nset( 'shared_dirs', [ 'wp-content/uploads' ] );\n\nenv('composer_options', 'install --no-dev --verbose --prefer-dist --optimize-autoloader --no-progress --no-interaction');\n\n$server_config = __DIR__ . '/deploy-servers.yml';\n\nserverList( $server_config );\n```\n\nContent of `servers.yml`:\n\n``` yaml\ntesting.vendor:\n  host: myhost.de\n  port: 22\n  user: xxxxxx\n  identity_file:\n    public_key: ~/.ssh/id_rsa.pub\n    private_key: ~/.ssh/id_rsa\n  deploy_path: /var/www/project\n  branch: master\n```\n### Output log\n\nOutput for server defined in `deploy.php`\n\n```\n$ wp-content/vendor/bin/dep deploy testing.vendor -vvv\n➤ Executing task deploy:prepare\n↳ on [testing.vendor]\n> echo $0\n< bash\n< \n> if [ ! -d /var/www/... ]; then mkdir -p /var/www/...; fi\n> if [ ! -L /var/www/... ] && [ -d /var/www/... ]; then echo true; fi\n> cd /var/www/... && if [ ! -d releases ]; then mkdir releases; fi\n> cd /var/www/... && if [ ! -d shared ]; then mkdir shared; fi\n• done on [testing.vendor]\n✔ Ok [784ms]\n```\n\nOutput for server defined in `servers.yml`:\n\n```\n$ wp-content/vendor/bin/dep deploy testing.vendor -vvv\n➤ Executing task deploy:prepare\n↳ on [testing.vendor]\n[xxxxx@myhost.de] Password:\n> echo $0\n< bash\n< \n> if [ ! -d /var/www/... ]; then mkdir -p /var/www/...; fi\n> if [ ! -L /var/www/... ] && [ -d /var/www... ]; then echo true; fi\n> cd /var/www/... && if [ ! -d releases ]; then mkdir releases; fi\n> cd /home/www/... && if [ ! -d shared ]; then mkdir shared; fi\n• done on [testing.vendor]\n✔ Ok [3s 390ms]\n...\n```\n"},"comment":{"url":"https://api.github.com/repos/deployphp/deployer/issues/comments/258845443","html_url":"https://github.com/deployphp/deployer/issues/655#issuecomment-258845443","issue_url":"https://api.github.com/repos/deployphp/deployer/issues/655","id":258845443,"user":{"login":"elfet","id":141232,"avatar_url":"https://avatars.githubusercontent.com/u/141232?v=3","gravatar_id":"","url":"https://api.github.com/users/elfet","html_url":"https://github.com/elfet","followers_url":"https://api.github.com/users/elfet/followers","following_url":"https://api.github.com/users/elfet/following{/other_user}","gists_url":"https://api.github.com/users/elfet/gists{/gist_id}","starred_url":"https://api.github.com/users/elfet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elfet/subscriptions","organizations_url":"https://api.github.com/users/elfet/orgs","repos_url":"https://api.github.com/users/elfet/repos","events_url":"https://api.github.com/users/elfet/events{/privacy}","received_events_url":"https://api.github.com/users/elfet/received_events","type":"User","site_admin":false},"created_at":"2016-11-07T14:13:16Z","updated_at":"2016-11-07T14:13:16Z","body":"I think in that case:\r\n```\r\n  identity_file:\r\n    public_key: \"~/.ssh/custom_key.pub\"\r\n    private_key: \"~/.ssh/custom_key\"\r\n```\r\ndep must to ask for password. So if you don't want it, you need to specify it. Or if you password is `\"\"` empty string:\r\n\r\n```\r\n  identity_file:\r\n    public_key: \"~/.ssh/custom_key.pub\"\r\n    private_key: \"~/.ssh/custom_key\"\r\n    password: \"\"\r\n```"}}
{"actor":{"display_login":"elfet"}}