{"action":"created","issue":{"url":"https://api.github.com/repos/furier/websync/issues/6","labels_url":"https://api.github.com/repos/furier/websync/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/furier/websync/issues/6/comments","events_url":"https://api.github.com/repos/furier/websync/issues/6/events","html_url":"https://github.com/furier/websync/issues/6","id":40735725,"number":6,"title":"ssh-copy-id not working for websync@docker container","user":{"login":"furier","id":776919,"avatar_url":"https://avatars.githubusercontent.com/u/776919?v=3","gravatar_id":"","url":"https://api.github.com/users/furier","html_url":"https://github.com/furier","followers_url":"https://api.github.com/users/furier/followers","following_url":"https://api.github.com/users/furier/following{/other_user}","gists_url":"https://api.github.com/users/furier/gists{/gist_id}","starred_url":"https://api.github.com/users/furier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/furier/subscriptions","organizations_url":"https://api.github.com/users/furier/orgs","repos_url":"https://api.github.com/users/furier/repos","events_url":"https://api.github.com/users/furier/events{/privacy}","received_events_url":"https://api.github.com/users/furier/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/furier/websync/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"furier","id":776919,"avatar_url":"https://avatars.githubusercontent.com/u/776919?v=3","gravatar_id":"","url":"https://api.github.com/users/furier","html_url":"https://github.com/furier","followers_url":"https://api.github.com/users/furier/followers","following_url":"https://api.github.com/users/furier/following{/other_user}","gists_url":"https://api.github.com/users/furier/gists{/gist_id}","starred_url":"https://api.github.com/users/furier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/furier/subscriptions","organizations_url":"https://api.github.com/users/furier/orgs","repos_url":"https://api.github.com/users/furier/repos","events_url":"https://api.github.com/users/furier/events{/privacy}","received_events_url":"https://api.github.com/users/furier/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2014-08-20T19:30:41Z","updated_at":"2015-10-30T17:19:17Z","closed_at":null,"body":"To investigate the problem I logged on to the websync docker container with [**nsenter**](https://github.com/jpetazzo/nsenter), and tried to use the `ssh-copy-id` command and got the following feedback:\r\n\r\n    /usr/bin/ssh-copy-id: ERROR: No identities found\r\n\r\nSince I rememberd I had generated a ssh key previously, I went looking for it in `~`, which resulted in:\r\n\r\n    -bash: cd: /home/<username>: No such file or directory\r\n\r\nhmmm, it sais i'm logged in as `root`...\r\n`/root/.ssh/id_rsa` exists but it didn't try to use that id...\r\n\r\nThen I tried specifying the key file with the `ssh-copy-id` command and got another result:\r\n\r\n    mktemp: failed to create file via template '/home/<username>/.ssh/ssh-copy-id_id.XXXXXXXXXX': No such file or directory\r\n    mktemp failed\r\n\r\ncreating the directories `/home/<username>/.ssh/` solved the problem, but this is still a problem that needs to be fixed generally."},"comment":{"url":"https://api.github.com/repos/furier/websync/issues/comments/152592105","html_url":"https://github.com/furier/websync/issues/6#issuecomment-152592105","issue_url":"https://api.github.com/repos/furier/websync/issues/6","id":152592105,"user":{"login":"behinddesign","id":5952441,"avatar_url":"https://avatars.githubusercontent.com/u/5952441?v=3","gravatar_id":"","url":"https://api.github.com/users/behinddesign","html_url":"https://github.com/behinddesign","followers_url":"https://api.github.com/users/behinddesign/followers","following_url":"https://api.github.com/users/behinddesign/following{/other_user}","gists_url":"https://api.github.com/users/behinddesign/gists{/gist_id}","starred_url":"https://api.github.com/users/behinddesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/behinddesign/subscriptions","organizations_url":"https://api.github.com/users/behinddesign/orgs","repos_url":"https://api.github.com/users/behinddesign/repos","events_url":"https://api.github.com/users/behinddesign/events{/privacy}","received_events_url":"https://api.github.com/users/behinddesign/received_events","type":"User","site_admin":false},"created_at":"2015-10-30T17:19:17Z","updated_at":"2015-10-30T17:19:17Z","body":"sshpass -p 'mypass' ssh-copy-id -o StrictHostKeyChecking=no user@host\r\n\r\nhttps://github.com/furier/websync/blob/master/lib/ssh-copy-id.js#L42\r\n\r\nThis was the only way I was able to get websync working in a docker environment. By default, sshpass wasn't able to send the password through to ssh-copy-id when it prompts for a fingerprint.\r\n\r\nThis obviously has it's downsides but without building a UI to confirm the fingerprint, it needs to be skipped."}}