google-auth-library-ruby
google-auth-library-ruby copied to clipboard
googleauth-1.11.0/lib/googleauth/service_account.rb:87:in `unescape': undefined method `gsub' for nil:NilClass
- OS: ubuntu 20.04
- Ruby version: 2.7.0
- Gem name and version: googleauth 1.11.0
Steps to reproduce
- Attempt to use make_creds with json_key
#! /usr/bin/ruby
require 'googleauth'
SERVICE_ACCOUNT_PRIVATE_KEY = "-----BEGIN PRIVATE KEY-----MIIE1234ABCD-----END PRIVATE KEY-----"
begin credentials = Google::Auth::ServiceAccountCredentials.make_creds( scope: "https://analyticsreporting.googleapis.com/v4/reports:batchGet", json_key: SERVICE_ACCOUNT_PRIVATE_KEY ) rescue => error puts "Error: #{error.message}" end
I got the same issue this morning.