{"action":"created","comment":{"url":"https://api.github.com/repos/gravitational/teleport/pulls/comments/173585421","pull_request_review_id":102810033,"id":173585421,"diff_hunk":"@@ -376,14 +375,25 @@ func onLogout(cf *CLIConf) {\n \t\tfmt.Printf(\"Logged out %v from %v.\\n\", cf.Username, proxyHost)\n \t// remove all keys\n \tcase proxyHost == \"\" && cf.Username == \"\":\n-\t\terr = flka.DeleteKeys()\n+\t\t// The makeClient function requires a proxy. However this value is not used\n+\t\t// because the user will be logged out from all proxies. Pass a dummy value\n+\t\t// to allow creation of the TeleportClient.\n+\t\tcf.Proxy = \"dummy:1234\"\n+\t\ttc, err := makeClient(cf, true)\n+\t\tif err != nil {\n+\t\t\tutils.FatalError(err)\n+\t\t}\n+\n+\t\t// Remove all keys from disk and the running agent.\n+\t\terr = tc.LogoutAll()\n \t\tif err != nil {\n \t\t\tfmt.Printf(\"Unable to remove all keys: %v\\n\", err)","path":"tool/tsh/tsh.go","position":46,"original_position":46,"commit_id":"88361e4dc3272067cfb9664f3989f66f58c200b5","original_commit_id":"88361e4dc3272067cfb9664f3989f66f58c200b5","user":{"login":"klizhentas","id":13717,"avatar_url":"https://avatars1.githubusercontent.com/u/13717?v=4","gravatar_id":"","url":"https://api.github.com/users/klizhentas","html_url":"https://github.com/klizhentas","followers_url":"https://api.github.com/users/klizhentas/followers","following_url":"https://api.github.com/users/klizhentas/following{/other_user}","gists_url":"https://api.github.com/users/klizhentas/gists{/gist_id}","starred_url":"https://api.github.com/users/klizhentas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klizhentas/subscriptions","organizations_url":"https://api.github.com/users/klizhentas/orgs","repos_url":"https://api.github.com/users/klizhentas/repos","events_url":"https://api.github.com/users/klizhentas/events{/privacy}","received_events_url":"https://api.github.com/users/klizhentas/received_events","type":"User","site_admin":false},"body":"if we failed here, why do we exit with 0 error code then?","created_at":"2018-03-09T22:32:24Z","updated_at":"2018-03-09T22:32:30Z","html_url":"https://github.com/gravitational/teleport/pull/1761#discussion_r173585421","pull_request_url":"https://api.github.com/repos/gravitational/teleport/pulls/1761","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/gravitational/teleport/pulls/comments/173585421"},"html":{"href":"https://github.com/gravitational/teleport/pull/1761#discussion_r173585421"},"pull_request":{"href":"https://api.github.com/repos/gravitational/teleport/pulls/1761"}}},"pull_request":{"url":"https://api.github.com/repos/gravitational/teleport/pulls/1761","id":174124422,"html_url":"https://github.com/gravitational/teleport/pull/1761","diff_url":"https://github.com/gravitational/teleport/pull/1761.diff","patch_url":"https://github.com/gravitational/teleport/pull/1761.patch","issue_url":"https://api.github.com/repos/gravitational/teleport/issues/1761","number":1761,"state":"open","locked":false,"title":"Unload keys from agent upon logout.","user":{"login":"russjones","id":5017502,"avatar_url":"https://avatars0.githubusercontent.com/u/5017502?v=4","gravatar_id":"","url":"https://api.github.com/users/russjones","html_url":"https://github.com/russjones","followers_url":"https://api.github.com/users/russjones/followers","following_url":"https://api.github.com/users/russjones/following{/other_user}","gists_url":"https://api.github.com/users/russjones/gists{/gist_id}","starred_url":"https://api.github.com/users/russjones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/russjones/subscriptions","organizations_url":"https://api.github.com/users/russjones/orgs","repos_url":"https://api.github.com/users/russjones/repos","events_url":"https://api.github.com/users/russjones/events{/privacy}","received_events_url":"https://api.github.com/users/russjones/received_events","type":"User","site_admin":false},"body":"**Purpose**\r\n\r\nUnload keys from agent upon logout.\r\n\r\n**Implementation**\r\n\r\n* Instead of operating on the filesystem keystore directly, operate on the key agent so keys can be unloaded from the agent upon logout.\r\n\r\n**Related Issues**\r\n\r\nFixes https://github.com/gravitational/teleport/issues/1541","created_at":"2018-03-09T22:28:50Z","updated_at":"2018-03-09T22:32:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"429d9454388bc6f6e665e1af52ed871b03acdd18","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/gravitational/teleport/pulls/1761/commits","review_comments_url":"https://api.github.com/repos/gravitational/teleport/pulls/1761/comments","review_comment_url":"https://api.github.com/repos/gravitational/teleport/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gravitational/teleport/issues/1761/comments","statuses_url":"https://api.github.com/repos/gravitational/teleport/statuses/88361e4dc3272067cfb9664f3989f66f58c200b5","head":{"label":"gravitational:rjones/fix-logout-reg","ref":"rjones/fix-logout-reg","sha":"88361e4dc3272067cfb9664f3989f66f58c200b5","user":{"login":"gravitational","id":10781132,"avatar_url":"https://avatars2.githubusercontent.com/u/10781132?v=4","gravatar_id":"","url":"https://api.github.com/users/gravitational","html_url":"https://github.com/gravitational","followers_url":"https://api.github.com/users/gravitational/followers","following_url":"https://api.github.com/users/gravitational/following{/other_user}","gists_url":"https://api.github.com/users/gravitational/gists{/gist_id}","starred_url":"https://api.github.com/users/gravitational/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gravitational/subscriptions","organizations_url":"https://api.github.com/users/gravitational/orgs","repos_url":"https://api.github.com/users/gravitational/repos","events_url":"https://api.github.com/users/gravitational/events{/privacy}","received_events_url":"https://api.github.com/users/gravitational/received_events","type":"Organization","site_admin":false},"repo":{"id":31558937,"name":"teleport","full_name":"gravitational/teleport","owner":{"login":"gravitational","id":10781132,"avatar_url":"https://avatars2.githubusercontent.com/u/10781132?v=4","gravatar_id":"","url":"https://api.github.com/users/gravitational","html_url":"https://github.com/gravitational","followers_url":"https://api.github.com/users/gravitational/followers","following_url":"https://api.github.com/users/gravitational/following{/other_user}","gists_url":"https://api.github.com/users/gravitational/gists{/gist_id}","starred_url":"https://api.github.com/users/gravitational/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gravitational/subscriptions","organizations_url":"https://api.github.com/users/gravitational/orgs","repos_url":"https://api.github.com/users/gravitational/repos","events_url":"https://api.github.com/users/gravitational/events{/privacy}","received_events_url":"https://api.github.com/users/gravitational/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gravitational/teleport","description":"Modern SSH server for clusters and teams.","fork":false,"url":"https://api.github.com/repos/gravitational/teleport","forks_url":"https://api.github.com/repos/gravitational/teleport/forks","keys_url":"https://api.github.com/repos/gravitational/teleport/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gravitational/teleport/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gravitational/teleport/teams","hooks_url":"https://api.github.com/repos/gravitational/teleport/hooks","issue_events_url":"https://api.github.com/repos/gravitational/teleport/issues/events{/number}","events_url":"https://api.github.com/repos/gravitational/teleport/events","assignees_url":"https://api.github.com/repos/gravitational/teleport/assignees{/user}","branches_url":"https://api.github.com/repos/gravitational/teleport/branches{/branch}","tags_url":"https://api.github.com/repos/gravitational/teleport/tags","blobs_url":"https://api.github.com/repos/gravitational/teleport/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gravitational/teleport/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gravitational/teleport/git/refs{/sha}","trees_url":"https://api.github.com/repos/gravitational/teleport/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gravitational/teleport/statuses/{sha}","languages_url":"https://api.github.com/repos/gravitational/teleport/languages","stargazers_url":"https://api.github.com/repos/gravitational/teleport/stargazers","contributors_url":"https://api.github.com/repos/gravitational/teleport/contributors","subscribers_url":"https://api.github.com/repos/gravitational/teleport/subscribers","subscription_url":"https://api.github.com/repos/gravitational/teleport/subscription","commits_url":"https://api.github.com/repos/gravitational/teleport/commits{/sha}","git_commits_url":"https://api.github.com/repos/gravitational/teleport/git/commits{/sha}","comments_url":"https://api.github.com/repos/gravitational/teleport/comments{/number}","issue_comment_url":"https://api.github.com/repos/gravitational/teleport/issues/comments{/number}","contents_url":"https://api.github.com/repos/gravitational/teleport/contents/{+path}","compare_url":"https://api.github.com/repos/gravitational/teleport/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gravitational/teleport/merges","archive_url":"https://api.github.com/repos/gravitational/teleport/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gravitational/teleport/downloads","issues_url":"https://api.github.com/repos/gravitational/teleport/issues{/number}","pulls_url":"https://api.github.com/repos/gravitational/teleport/pulls{/number}","milestones_url":"https://api.github.com/repos/gravitational/teleport/milestones{/number}","notifications_url":"https://api.github.com/repos/gravitational/teleport/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gravitational/teleport/labels{/name}","releases_url":"https://api.github.com/repos/gravitational/teleport/releases{/id}","deployments_url":"https://api.github.com/repos/gravitational/teleport/deployments","created_at":"2015-03-02T19:36:00Z","updated_at":"2018-03-09T22:09:25Z","pushed_at":"2018-03-09T22:30:26Z","git_url":"git://github.com/gravitational/teleport.git","ssh_url":"git@github.com:gravitational/teleport.git","clone_url":"https://github.com/gravitational/teleport.git","svn_url":"https://github.com/gravitational/teleport","homepage":"https://gravitational.com/teleport","size":46992,"stargazers_count":5764,"watchers_count":5764,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":310,"mirror_url":null,"archived":false,"open_issues_count":126,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":310,"open_issues":126,"watchers":5764,"default_branch":"master"}},"base":{"label":"gravitational:master","ref":"master","sha":"7db60bc0107243768d1a6c8b6b8597d70e446a13","user":{"login":"gravitational","id":10781132,"avatar_url":"https://avatars2.githubusercontent.com/u/10781132?v=4","gravatar_id":"","url":"https://api.github.com/users/gravitational","html_url":"https://github.com/gravitational","followers_url":"https://api.github.com/users/gravitational/followers","following_url":"https://api.github.com/users/gravitational/following{/other_user}","gists_url":"https://api.github.com/users/gravitational/gists{/gist_id}","starred_url":"https://api.github.com/users/gravitational/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gravitational/subscriptions","organizations_url":"https://api.github.com/users/gravitational/orgs","repos_url":"https://api.github.com/users/gravitational/repos","events_url":"https://api.github.com/users/gravitational/events{/privacy}","received_events_url":"https://api.github.com/users/gravitational/received_events","type":"Organization","site_admin":false},"repo":{"id":31558937,"name":"teleport","full_name":"gravitational/teleport","owner":{"login":"gravitational","id":10781132,"avatar_url":"https://avatars2.githubusercontent.com/u/10781132?v=4","gravatar_id":"","url":"https://api.github.com/users/gravitational","html_url":"https://github.com/gravitational","followers_url":"https://api.github.com/users/gravitational/followers","following_url":"https://api.github.com/users/gravitational/following{/other_user}","gists_url":"https://api.github.com/users/gravitational/gists{/gist_id}","starred_url":"https://api.github.com/users/gravitational/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gravitational/subscriptions","organizations_url":"https://api.github.com/users/gravitational/orgs","repos_url":"https://api.github.com/users/gravitational/repos","events_url":"https://api.github.com/users/gravitational/events{/privacy}","received_events_url":"https://api.github.com/users/gravitational/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gravitational/teleport","description":"Modern SSH server for clusters and teams.","fork":false,"url":"https://api.github.com/repos/gravitational/teleport","forks_url":"https://api.github.com/repos/gravitational/teleport/forks","keys_url":"https://api.github.com/repos/gravitational/teleport/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gravitational/teleport/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gravitational/teleport/teams","hooks_url":"https://api.github.com/repos/gravitational/teleport/hooks","issue_events_url":"https://api.github.com/repos/gravitational/teleport/issues/events{/number}","events_url":"https://api.github.com/repos/gravitational/teleport/events","assignees_url":"https://api.github.com/repos/gravitational/teleport/assignees{/user}","branches_url":"https://api.github.com/repos/gravitational/teleport/branches{/branch}","tags_url":"https://api.github.com/repos/gravitational/teleport/tags","blobs_url":"https://api.github.com/repos/gravitational/teleport/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gravitational/teleport/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gravitational/teleport/git/refs{/sha}","trees_url":"https://api.github.com/repos/gravitational/teleport/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gravitational/teleport/statuses/{sha}","languages_url":"https://api.github.com/repos/gravitational/teleport/languages","stargazers_url":"https://api.github.com/repos/gravitational/teleport/stargazers","contributors_url":"https://api.github.com/repos/gravitational/teleport/contributors","subscribers_url":"https://api.github.com/repos/gravitational/teleport/subscribers","subscription_url":"https://api.github.com/repos/gravitational/teleport/subscription","commits_url":"https://api.github.com/repos/gravitational/teleport/commits{/sha}","git_commits_url":"https://api.github.com/repos/gravitational/teleport/git/commits{/sha}","comments_url":"https://api.github.com/repos/gravitational/teleport/comments{/number}","issue_comment_url":"https://api.github.com/repos/gravitational/teleport/issues/comments{/number}","contents_url":"https://api.github.com/repos/gravitational/teleport/contents/{+path}","compare_url":"https://api.github.com/repos/gravitational/teleport/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gravitational/teleport/merges","archive_url":"https://api.github.com/repos/gravitational/teleport/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gravitational/teleport/downloads","issues_url":"https://api.github.com/repos/gravitational/teleport/issues{/number}","pulls_url":"https://api.github.com/repos/gravitational/teleport/pulls{/number}","milestones_url":"https://api.github.com/repos/gravitational/teleport/milestones{/number}","notifications_url":"https://api.github.com/repos/gravitational/teleport/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gravitational/teleport/labels{/name}","releases_url":"https://api.github.com/repos/gravitational/teleport/releases{/id}","deployments_url":"https://api.github.com/repos/gravitational/teleport/deployments","created_at":"2015-03-02T19:36:00Z","updated_at":"2018-03-09T22:09:25Z","pushed_at":"2018-03-09T22:30:26Z","git_url":"git://github.com/gravitational/teleport.git","ssh_url":"git@github.com:gravitational/teleport.git","clone_url":"https://github.com/gravitational/teleport.git","svn_url":"https://github.com/gravitational/teleport","homepage":"https://gravitational.com/teleport","size":46992,"stargazers_count":5764,"watchers_count":5764,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":310,"mirror_url":null,"archived":false,"open_issues_count":126,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":310,"open_issues":126,"watchers":5764,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gravitational/teleport/pulls/1761"},"html":{"href":"https://github.com/gravitational/teleport/pull/1761"},"issue":{"href":"https://api.github.com/repos/gravitational/teleport/issues/1761"},"comments":{"href":"https://api.github.com/repos/gravitational/teleport/issues/1761/comments"},"review_comments":{"href":"https://api.github.com/repos/gravitational/teleport/pulls/1761/comments"},"review_comment":{"href":"https://api.github.com/repos/gravitational/teleport/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gravitational/teleport/pulls/1761/commits"},"statuses":{"href":"https://api.github.com/repos/gravitational/teleport/statuses/88361e4dc3272067cfb9664f3989f66f58c200b5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"klizhentas"}}