{"action":"created","issue":{"url":"https://api.github.com/repos/robbyrussell/oh-my-zsh/issues/6469","repository_url":"https://api.github.com/repos/robbyrussell/oh-my-zsh","labels_url":"https://api.github.com/repos/robbyrussell/oh-my-zsh/issues/6469/labels{/name}","comments_url":"https://api.github.com/repos/robbyrussell/oh-my-zsh/issues/6469/comments","events_url":"https://api.github.com/repos/robbyrussell/oh-my-zsh/issues/6469/events","html_url":"https://github.com/robbyrussell/oh-my-zsh/pull/6469","id":279038952,"number":6469,"title":"Fix gpg-agent plugin checks","user":{"login":"chrisfleming","id":230932,"avatar_url":"https://avatars2.githubusercontent.com/u/230932?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisfleming","html_url":"https://github.com/chrisfleming","followers_url":"https://api.github.com/users/chrisfleming/followers","following_url":"https://api.github.com/users/chrisfleming/following{/other_user}","gists_url":"https://api.github.com/users/chrisfleming/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisfleming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisfleming/subscriptions","organizations_url":"https://api.github.com/users/chrisfleming/orgs","repos_url":"https://api.github.com/users/chrisfleming/repos","events_url":"https://api.github.com/users/chrisfleming/events{/privacy}","received_events_url":"https://api.github.com/users/chrisfleming/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-12-04T15:36:06Z","updated_at":"2018-04-19T18:29:09Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/robbyrussell/oh-my-zsh/pulls/6469","html_url":"https://github.com/robbyrussell/oh-my-zsh/pull/6469","diff_url":"https://github.com/robbyrussell/oh-my-zsh/pull/6469.diff","patch_url":"https://github.com/robbyrussell/oh-my-zsh/pull/6469.patch"},"body":"I discovered a few problems with the gpg-agent plugin changes on some machines. \r\n\r\n1. ${XDG_RUNTIME_DIR}  isn't always set\r\n2. Older versions of gpg-agent do not use the \"default location\", therefore multiple agents are opened.\r\n\r\nTherefore my solution is to use the gpgconf file to get the default location of the socket. We use this as the test to see if we need to start the agent.\r\n\r\nAdding -use-standard-socket to starting the daemon means that older versions of gpg-agent behave in the same was as newer versions. \r\n\r\nI applied the same idea for the ssh agent. We can check if we have an ssh socket, if so then we set the SSH_AUTH_SOCKET - The reason for this is that newer versions of gpg-agent default to enabling ssh-agent therefore checking for the config variable wasn't reliable.\r\n\r\nHope this all makes sense.\r\n\r\nCheers\r\nChris"},"comment":{"url":"https://api.github.com/repos/robbyrussell/oh-my-zsh/issues/comments/382835965","html_url":"https://github.com/robbyrussell/oh-my-zsh/pull/6469#issuecomment-382835965","issue_url":"https://api.github.com/repos/robbyrussell/oh-my-zsh/issues/6469","id":382835965,"user":{"login":"mcornella","id":1441704,"avatar_url":"https://avatars1.githubusercontent.com/u/1441704?v=4","gravatar_id":"","url":"https://api.github.com/users/mcornella","html_url":"https://github.com/mcornella","followers_url":"https://api.github.com/users/mcornella/followers","following_url":"https://api.github.com/users/mcornella/following{/other_user}","gists_url":"https://api.github.com/users/mcornella/gists{/gist_id}","starred_url":"https://api.github.com/users/mcornella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcornella/subscriptions","organizations_url":"https://api.github.com/users/mcornella/orgs","repos_url":"https://api.github.com/users/mcornella/repos","events_url":"https://api.github.com/users/mcornella/events{/privacy}","received_events_url":"https://api.github.com/users/mcornella/received_events","type":"User","site_admin":false},"created_at":"2018-04-19T18:29:09Z","updated_at":"2018-04-19T18:29:09Z","author_association":"COLLABORATOR","body":"What's the status of this PR? Is it working in all platforms and versions?\r\n\r\nShould we add version checking in case `--use-standard-socket` is killed in future versions? For that there is the [`is-at-least` zsh function](https://github.com/zsh-users/zsh/blob/master/Functions/Misc/is-at-least): `is-at-least min-version $VERSION`.\r\n\r\nLet me know."}}
{"actor":{"display_login":"mcornella"}}