{"action":"created","issue":{"url":"https://api.github.com/repos/andres-montanez/Magallanes/issues/226","labels_url":"https://api.github.com/repos/andres-montanez/Magallanes/issues/226/labels{/name}","comments_url":"https://api.github.com/repos/andres-montanez/Magallanes/issues/226/comments","events_url":"https://api.github.com/repos/andres-montanez/Magallanes/issues/226/events","html_url":"https://github.com/andres-montanez/Magallanes/pull/226","id":76679499,"number":226,"title":"New use-sudo option","user":{"login":"csuarez","id":680660,"avatar_url":"https://avatars.githubusercontent.com/u/680660?v=3","gravatar_id":"","url":"https://api.github.com/users/csuarez","html_url":"https://github.com/csuarez","followers_url":"https://api.github.com/users/csuarez/followers","following_url":"https://api.github.com/users/csuarez/following{/other_user}","gists_url":"https://api.github.com/users/csuarez/gists{/gist_id}","starred_url":"https://api.github.com/users/csuarez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csuarez/subscriptions","organizations_url":"https://api.github.com/users/csuarez/orgs","repos_url":"https://api.github.com/users/csuarez/repos","events_url":"https://api.github.com/users/csuarez/events{/privacy}","received_events_url":"https://api.github.com/users/csuarez/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/andres-montanez/Magallanes/labels/Improvement","name":"Improvement","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-15T10:13:33Z","updated_at":"2015-05-22T07:49:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/andres-montanez/Magallanes/pulls/226","html_url":"https://github.com/andres-montanez/Magallanes/pull/226","diff_url":"https://github.com/andres-montanez/Magallanes/pull/226.diff","patch_url":"https://github.com/andres-montanez/Magallanes/pull/226.patch"},"body":"Hello,\r\n\r\nIn some cases a server doesn't have a `root` user, and in order to deploy with Magallanes, an user with *sudo* permissions is needed (e.g. where I work because a security policy servers shouldn't have a `root` user). Maybe it is not an ideal scenario, but sometimes as a developer you have to manage with this kind of restrictions. So I have added a new option (`use-sudo`) to execute all deployment commands as *sudo*. The activation of this option is straightforward, and by default is set to `false`:\r\n\r\n```yml\r\ndeployment:\r\n  user: foo\r\n  use-sudo: true\r\n```\r\n\r\nI've changed the *TarGzTask* too. Because you can't do an `scp` to a folder wich needs *sudo* permissions, when `use-sudo` is enabled, the tar.gz is previously uploaded to `/tmp` and after that it is moved to the right destination.\r\n\r\nI hope you can find it useful :)\r\n\r\nRegards\r\n\r\n**NOTE**: Related issues: #111 "},"comment":{"url":"https://api.github.com/repos/andres-montanez/Magallanes/issues/comments/104554785","html_url":"https://github.com/andres-montanez/Magallanes/pull/226#issuecomment-104554785","issue_url":"https://api.github.com/repos/andres-montanez/Magallanes/issues/226","id":104554785,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars.githubusercontent.com/u/2354108?v=3","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2015-05-22T07:49:43Z","updated_at":"2015-05-22T07:49:43Z","body":"\n[![Coverage Status](https://coveralls.io/builds/2625634/badge)](https://coveralls.io/builds/2625634)\n\nCoverage increased (+8.76%) to 32.54% when pulling **2cc3a2d88c1d2b598db59ba1fe442ca401eaf9b1 on csuarez:usesudo** into **bbefc65888ad07e5c02a255c199c0ab4b5757d56 on andres-montanez:develop**.\n"}}