{"action":"opened","issue":{"url":"https://api.github.com/repos/deployphp/deployer/issues/273","labels_url":"https://api.github.com/repos/deployphp/deployer/issues/273/labels{/name}","comments_url":"https://api.github.com/repos/deployphp/deployer/issues/273/comments","events_url":"https://api.github.com/repos/deployphp/deployer/issues/273/events","html_url":"https://github.com/deployphp/deployer/issues/273","id":78615366,"number":273,"title":"Home path on windows","user":{"login":"leandrogehlen","id":1750751,"avatar_url":"https://avatars.githubusercontent.com/u/1750751?v=3","gravatar_id":"","url":"https://api.github.com/users/leandrogehlen","html_url":"https://github.com/leandrogehlen","followers_url":"https://api.github.com/users/leandrogehlen/followers","following_url":"https://api.github.com/users/leandrogehlen/following{/other_user}","gists_url":"https://api.github.com/users/leandrogehlen/gists{/gist_id}","starred_url":"https://api.github.com/users/leandrogehlen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leandrogehlen/subscriptions","organizations_url":"https://api.github.com/users/leandrogehlen/orgs","repos_url":"https://api.github.com/users/leandrogehlen/repos","events_url":"https://api.github.com/users/leandrogehlen/events{/privacy}","received_events_url":"https://api.github.com/users/leandrogehlen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-20T17:23:00Z","updated_at":"2015-05-20T17:23:00Z","closed_at":null,"body":"I have the following script:\r\n\r\n ```php\r\nserver('main', 'myserver.com')\r\n    ->stage('producao')\r\n    ->env('deploy_path', '/usr/share/nginx/html/web-app')\r\n    ->user('admin')\r\n    ->pemFile('~/.ssh/key.pem');\r\n```\r\nthat results in an exception:\r\n```php\r\nfile_get_contents(~/.ssh/key.pem): failed to open stream: No such file or directory in phar://C:/ProgramData/Deployer/deployer.phar/src/Server/Remote/PhpSecLib.php on line 72\r\n```\r\nMy solution was: \r\n```php\r\n$home = (isset($_SERVER['HOMEDRIVE'])) ? $_SERVER['HOMEDRIVE'] . $_SERVER['HOMEPATH'] : $_SERVER['HOME'];\r\n\r\nserver('main', 'myserver.com')\r\n    ->stage('producao')\r\n    ->env('deploy_path', '/usr/share/nginx/html/web-app')\r\n    ->user('admin')\r\n    ->pemFile($home . '/.ssh/key.pem');\r\n```\r\n\r\n"}}