{"action":"closed","number":24,"pull_request":{"url":"https://api.github.com/repos/chevah/chevah-keycert/pulls/24","id":34242052,"html_url":"https://github.com/chevah/chevah-keycert/pull/24","diff_url":"https://github.com/chevah/chevah-keycert/pull/24.diff","patch_url":"https://github.com/chevah/chevah-keycert/pull/24.patch","issue_url":"https://api.github.com/repos/chevah/chevah-keycert/issues/24","number":24,"state":"closed","locked":false,"title":"Convert IOErrors into keycert errors. Raise ssh errors from KeyCertErrors","user":{"login":"adiroiban","id":204609,"avatar_url":"https://avatars.githubusercontent.com/u/204609?v=3","gravatar_id":"","url":"https://api.github.com/users/adiroiban","html_url":"https://github.com/adiroiban","followers_url":"https://api.github.com/users/adiroiban/followers","following_url":"https://api.github.com/users/adiroiban/following{/other_user}","gists_url":"https://api.github.com/users/adiroiban/gists{/gist_id}","starred_url":"https://api.github.com/users/adiroiban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adiroiban/subscriptions","organizations_url":"https://api.github.com/users/adiroiban/orgs","repos_url":"https://api.github.com/users/adiroiban/repos","events_url":"https://api.github.com/users/adiroiban/events{/privacy}","received_events_url":"https://api.github.com/users/adiroiban/received_events","type":"User","site_admin":false},"body":"Problem\r\n=======\r\n\r\nRan into the following exception when issuing a server command from an unprivileged account:\r\n\r\n```\r\n  File \"C:\\Program Files (x86)\\Server\\lib\\lib\\site-packages\\chevah\\serv\r\ner\\commons\\commands.py\", line 608, in subcommand_generate_ssh_key\r\n    exit_code, message, key = crypto_generate_ssh_key(options)\r\n  File \"C:\\Program Files (x86)\\Server\\lib\\lib\\site-packages\\chevah\\keyc\r\nert\\ssh.py\", line 135, in generate_ssh_key\r\n    with open_method(_path(private_file), 'wb') as file_handler:\r\nIOError: [Errno 13] Permission denied: u'id_rsa'\r\n```\r\n\r\n\r\nChanges\r\n=======\r\n\r\nCatch all exceptions and turn them into own execeptions\r\n\r\nAs a drive by I have reorganized ssh exceptions to raise exceptions inherited from a single exception type.\r\n\r\nHow to test\r\n=========\r\n\r\nreviewers: @alibotean \r\n\r\ncheck that changes make sense\r\n\r\nTest pass on Travis-ci ... but I think that they fail on windows... I have manually sent the changes to buildbot\r\n\r\nThanks!","created_at":"2015-04-28T08:00:42Z","updated_at":"2015-04-28T09:46:30Z","closed_at":"2015-04-28T09:46:30Z","merged_at":"2015-04-28T09:46:30Z","merge_commit_sha":"57b289c89637f8c3346ffb1413025dbc0f243bee","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chevah/chevah-keycert/pulls/24/commits","review_comments_url":"https://api.github.com/repos/chevah/chevah-keycert/pulls/24/comments","review_comment_url":"https://api.github.com/repos/chevah/chevah-keycert/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chevah/chevah-keycert/issues/24/comments","statuses_url":"https://api.github.com/repos/chevah/chevah-keycert/statuses/ee428f241af54c754e273f52f80c5dd5f7671e48","head":{"label":"chevah:24-ssh-os-error","ref":"24-ssh-os-error","sha":"ee428f241af54c754e273f52f80c5dd5f7671e48","user":{"login":"chevah","id":1153635,"avatar_url":"https://avatars.githubusercontent.com/u/1153635?v=3","gravatar_id":"","url":"https://api.github.com/users/chevah","html_url":"https://github.com/chevah","followers_url":"https://api.github.com/users/chevah/followers","following_url":"https://api.github.com/users/chevah/following{/other_user}","gists_url":"https://api.github.com/users/chevah/gists{/gist_id}","starred_url":"https://api.github.com/users/chevah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chevah/subscriptions","organizations_url":"https://api.github.com/users/chevah/orgs","repos_url":"https://api.github.com/users/chevah/repos","events_url":"https://api.github.com/users/chevah/events{/privacy}","received_events_url":"https://api.github.com/users/chevah/received_events","type":"Organization","site_admin":false},"repo":{"id":27299475,"name":"chevah-keycert","full_name":"chevah/chevah-keycert","owner":{"login":"chevah","id":1153635,"avatar_url":"https://avatars.githubusercontent.com/u/1153635?v=3","gravatar_id":"","url":"https://api.github.com/users/chevah","html_url":"https://github.com/chevah","followers_url":"https://api.github.com/users/chevah/followers","following_url":"https://api.github.com/users/chevah/following{/other_user}","gists_url":"https://api.github.com/users/chevah/gists{/gist_id}","starred_url":"https://api.github.com/users/chevah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chevah/subscriptions","organizations_url":"https://api.github.com/users/chevah/orgs","repos_url":"https://api.github.com/users/chevah/repos","events_url":"https://api.github.com/users/chevah/events{/privacy}","received_events_url":"https://api.github.com/users/chevah/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chevah/chevah-keycert","description":"SSH Keys and SSL certificates handling","fork":false,"url":"https://api.github.com/repos/chevah/chevah-keycert","forks_url":"https://api.github.com/repos/chevah/chevah-keycert/forks","keys_url":"https://api.github.com/repos/chevah/chevah-keycert/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chevah/chevah-keycert/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chevah/chevah-keycert/teams","hooks_url":"https://api.github.com/repos/chevah/chevah-keycert/hooks","issue_events_url":"https://api.github.com/repos/chevah/chevah-keycert/issues/events{/number}","events_url":"https://api.github.com/repos/chevah/chevah-keycert/events","assignees_url":"https://api.github.com/repos/chevah/chevah-keycert/assignees{/user}","branches_url":"https://api.github.com/repos/chevah/chevah-keycert/branches{/branch}","tags_url":"https://api.github.com/repos/chevah/chevah-keycert/tags","blobs_url":"https://api.github.com/repos/chevah/chevah-keycert/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chevah/chevah-keycert/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chevah/chevah-keycert/git/refs{/sha}","trees_url":"https://api.github.com/repos/chevah/chevah-keycert/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chevah/chevah-keycert/statuses/{sha}","languages_url":"https://api.github.com/repos/chevah/chevah-keycert/languages","stargazers_url":"https://api.github.com/repos/chevah/chevah-keycert/stargazers","contributors_url":"https://api.github.com/repos/chevah/chevah-keycert/contributors","subscribers_url":"https://api.github.com/repos/chevah/chevah-keycert/subscribers","subscription_url":"https://api.github.com/repos/chevah/chevah-keycert/subscription","commits_url":"https://api.github.com/repos/chevah/chevah-keycert/commits{/sha}","git_commits_url":"https://api.github.com/repos/chevah/chevah-keycert/git/commits{/sha}","comments_url":"https://api.github.com/repos/chevah/chevah-keycert/comments{/number}","issue_comment_url":"https://api.github.com/repos/chevah/chevah-keycert/issues/comments{/number}","contents_url":"https://api.github.com/repos/chevah/chevah-keycert/contents/{+path}","compare_url":"https://api.github.com/repos/chevah/chevah-keycert/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chevah/chevah-keycert/merges","archive_url":"https://api.github.com/repos/chevah/chevah-keycert/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chevah/chevah-keycert/downloads","issues_url":"https://api.github.com/repos/chevah/chevah-keycert/issues{/number}","pulls_url":"https://api.github.com/repos/chevah/chevah-keycert/pulls{/number}","milestones_url":"https://api.github.com/repos/chevah/chevah-keycert/milestones{/number}","notifications_url":"https://api.github.com/repos/chevah/chevah-keycert/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chevah/chevah-keycert/labels{/name}","releases_url":"https://api.github.com/repos/chevah/chevah-keycert/releases{/id}","created_at":"2014-11-29T10:59:51Z","updated_at":"2015-04-28T09:46:30Z","pushed_at":"2015-04-28T09:46:30Z","git_url":"git://github.com/chevah/chevah-keycert.git","ssh_url":"git@github.com:chevah/chevah-keycert.git","clone_url":"https://github.com/chevah/chevah-keycert.git","svn_url":"https://github.com/chevah/chevah-keycert","homepage":"http://styleguide.chevah.com","size":548,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":10,"forks":0,"open_issues":10,"watchers":1,"default_branch":"master"}},"base":{"label":"chevah:master","ref":"master","sha":"62fdd01976350acf8eebec50f24f076c56bf958b","user":{"login":"chevah","id":1153635,"avatar_url":"https://avatars.githubusercontent.com/u/1153635?v=3","gravatar_id":"","url":"https://api.github.com/users/chevah","html_url":"https://github.com/chevah","followers_url":"https://api.github.com/users/chevah/followers","following_url":"https://api.github.com/users/chevah/following{/other_user}","gists_url":"https://api.github.com/users/chevah/gists{/gist_id}","starred_url":"https://api.github.com/users/chevah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chevah/subscriptions","organizations_url":"https://api.github.com/users/chevah/orgs","repos_url":"https://api.github.com/users/chevah/repos","events_url":"https://api.github.com/users/chevah/events{/privacy}","received_events_url":"https://api.github.com/users/chevah/received_events","type":"Organization","site_admin":false},"repo":{"id":27299475,"name":"chevah-keycert","full_name":"chevah/chevah-keycert","owner":{"login":"chevah","id":1153635,"avatar_url":"https://avatars.githubusercontent.com/u/1153635?v=3","gravatar_id":"","url":"https://api.github.com/users/chevah","html_url":"https://github.com/chevah","followers_url":"https://api.github.com/users/chevah/followers","following_url":"https://api.github.com/users/chevah/following{/other_user}","gists_url":"https://api.github.com/users/chevah/gists{/gist_id}","starred_url":"https://api.github.com/users/chevah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chevah/subscriptions","organizations_url":"https://api.github.com/users/chevah/orgs","repos_url":"https://api.github.com/users/chevah/repos","events_url":"https://api.github.com/users/chevah/events{/privacy}","received_events_url":"https://api.github.com/users/chevah/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chevah/chevah-keycert","description":"SSH Keys and SSL certificates handling","fork":false,"url":"https://api.github.com/repos/chevah/chevah-keycert","forks_url":"https://api.github.com/repos/chevah/chevah-keycert/forks","keys_url":"https://api.github.com/repos/chevah/chevah-keycert/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chevah/chevah-keycert/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chevah/chevah-keycert/teams","hooks_url":"https://api.github.com/repos/chevah/chevah-keycert/hooks","issue_events_url":"https://api.github.com/repos/chevah/chevah-keycert/issues/events{/number}","events_url":"https://api.github.com/repos/chevah/chevah-keycert/events","assignees_url":"https://api.github.com/repos/chevah/chevah-keycert/assignees{/user}","branches_url":"https://api.github.com/repos/chevah/chevah-keycert/branches{/branch}","tags_url":"https://api.github.com/repos/chevah/chevah-keycert/tags","blobs_url":"https://api.github.com/repos/chevah/chevah-keycert/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chevah/chevah-keycert/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chevah/chevah-keycert/git/refs{/sha}","trees_url":"https://api.github.com/repos/chevah/chevah-keycert/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chevah/chevah-keycert/statuses/{sha}","languages_url":"https://api.github.com/repos/chevah/chevah-keycert/languages","stargazers_url":"https://api.github.com/repos/chevah/chevah-keycert/stargazers","contributors_url":"https://api.github.com/repos/chevah/chevah-keycert/contributors","subscribers_url":"https://api.github.com/repos/chevah/chevah-keycert/subscribers","subscription_url":"https://api.github.com/repos/chevah/chevah-keycert/subscription","commits_url":"https://api.github.com/repos/chevah/chevah-keycert/commits{/sha}","git_commits_url":"https://api.github.com/repos/chevah/chevah-keycert/git/commits{/sha}","comments_url":"https://api.github.com/repos/chevah/chevah-keycert/comments{/number}","issue_comment_url":"https://api.github.com/repos/chevah/chevah-keycert/issues/comments{/number}","contents_url":"https://api.github.com/repos/chevah/chevah-keycert/contents/{+path}","compare_url":"https://api.github.com/repos/chevah/chevah-keycert/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chevah/chevah-keycert/merges","archive_url":"https://api.github.com/repos/chevah/chevah-keycert/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chevah/chevah-keycert/downloads","issues_url":"https://api.github.com/repos/chevah/chevah-keycert/issues{/number}","pulls_url":"https://api.github.com/repos/chevah/chevah-keycert/pulls{/number}","milestones_url":"https://api.github.com/repos/chevah/chevah-keycert/milestones{/number}","notifications_url":"https://api.github.com/repos/chevah/chevah-keycert/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chevah/chevah-keycert/labels{/name}","releases_url":"https://api.github.com/repos/chevah/chevah-keycert/releases{/id}","created_at":"2014-11-29T10:59:51Z","updated_at":"2015-04-28T09:46:30Z","pushed_at":"2015-04-28T09:46:30Z","git_url":"git://github.com/chevah/chevah-keycert.git","ssh_url":"git@github.com:chevah/chevah-keycert.git","clone_url":"https://github.com/chevah/chevah-keycert.git","svn_url":"https://github.com/chevah/chevah-keycert","homepage":"http://styleguide.chevah.com","size":548,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":10,"forks":0,"open_issues":10,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chevah/chevah-keycert/pulls/24"},"html":{"href":"https://github.com/chevah/chevah-keycert/pull/24"},"issue":{"href":"https://api.github.com/repos/chevah/chevah-keycert/issues/24"},"comments":{"href":"https://api.github.com/repos/chevah/chevah-keycert/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/chevah/chevah-keycert/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/chevah/chevah-keycert/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chevah/chevah-keycert/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/chevah/chevah-keycert/statuses/ee428f241af54c754e273f52f80c5dd5f7671e48"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"adiroiban","id":204609,"avatar_url":"https://avatars.githubusercontent.com/u/204609?v=3","gravatar_id":"","url":"https://api.github.com/users/adiroiban","html_url":"https://github.com/adiroiban","followers_url":"https://api.github.com/users/adiroiban/followers","following_url":"https://api.github.com/users/adiroiban/following{/other_user}","gists_url":"https://api.github.com/users/adiroiban/gists{/gist_id}","starred_url":"https://api.github.com/users/adiroiban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adiroiban/subscriptions","organizations_url":"https://api.github.com/users/adiroiban/orgs","repos_url":"https://api.github.com/users/adiroiban/repos","events_url":"https://api.github.com/users/adiroiban/events{/privacy}","received_events_url":"https://api.github.com/users/adiroiban/received_events","type":"User","site_admin":false},"comments":4,"review_comments":1,"commits":2,"additions":82,"deletions":34,"changed_files":8}}