{"action":"closed","issue":{"url":"https://api.github.com/repos/google/google-api-ruby-client/issues/442","repository_url":"https://api.github.com/repos/google/google-api-ruby-client","labels_url":"https://api.github.com/repos/google/google-api-ruby-client/issues/442/labels{/name}","comments_url":"https://api.github.com/repos/google/google-api-ruby-client/issues/442/comments","events_url":"https://api.github.com/repos/google/google-api-ruby-client/issues/442/events","html_url":"https://github.com/google/google-api-ruby-client/issues/442","id":168717306,"number":442,"title":"service_account private_key failure","user":{"login":"etalley","id":15006890,"avatar_url":"https://avatars.githubusercontent.com/u/15006890?v=3","gravatar_id":"","url":"https://api.github.com/users/etalley","html_url":"https://github.com/etalley","followers_url":"https://api.github.com/users/etalley/followers","following_url":"https://api.github.com/users/etalley/following{/other_user}","gists_url":"https://api.github.com/users/etalley/gists{/gist_id}","starred_url":"https://api.github.com/users/etalley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etalley/subscriptions","organizations_url":"https://api.github.com/users/etalley/orgs","repos_url":"https://api.github.com/users/etalley/repos","events_url":"https://api.github.com/users/etalley/events{/privacy}","received_events_url":"https://api.github.com/users/etalley/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-01T19:01:24Z","updated_at":"2016-08-01T20:05:46Z","closed_at":"2016-08-01T20:05:46Z","body":"Using Version 0.8.6 I am trying to authenticate a service_account. I have downloaded the .json file from console.developers.google.com.\r\n\r\n\r\n    client = Google::APIClient.new(\r\n        :application_name => 'Example Ruby application',\r\n        :application_version => '1.0.0'\r\n     )\r\n\r\n    scope = [\"https://www.googleapis.com/auth/gmail.readonly\"]\r\n    s = StringIO.new(ENV['GOOGLE_CLIENT_SECRETS'])\r\n    authorization = Google::Auth::ServiceAccountCredentials.make_creds({:json_key_io=> s, :scope => scope})\r\n\r\n    client.authorization = authorization\r\n\r\nthe private key and client email both render correctly from the json reader but OpenSSL is throwing an error.\r\n\r\n> OpenSSL::PKey::RSAError: Neither PUB key nor PRIV key: nested asn1 error\r\n\r\nI have extracted the private_key to a PEM file and tried various methods to validate that its a valid PKS#8 key but so far it seems that its invalid. PuTTYgen couldn't load the pem.\r\n\r\nI can try upgrading to .0.9.11, I stayed on 0.8.6 due to bundler not seeing .9 but am looking for a bit of insight. "}}
{"actor":{"display_login":"etalley"}}