title: fog-google google-storage authentication fails
body: <p>I'm on rails 2.6.0 using carrierwaveUploader.
  No matter what i do i can not authenticate with my google API for storage.
  I've created the JSON key, the bucket, everything.</p>
  
  <p>My configs are:</p>
  
  <pre class="lang-rb prettyprint-override"><code>CarrierWave.configure do |config|
    config.fog_provider = 'fog/google'                        # required
    config.fog_credentials = {
      provider: 'Google',
      google_storage_access_key_id: 'REDACTED',
      google_storage_secret_access_key: '-----BEGIN PRIVATE KEY-----\nREDACTED\n-----END PRIVATE KEY-----\n'
  
      # google_json_key_location: Rails.root.join('rails-app.json')
    }
    config.fog_directory = 'gomes-commerce'
  end
  </code></pre>
  
  <p>I've tried to use <code>google_json_key_location</code> parameter as you can see, and give the path to the downloaded file as well... it doesn't work! 
  it gives an error about required parameters <code>google_storage_access_key_id</code> &amp;&amp; <code>google_storage_access_key</code>.</p>
  
  <p>My (related) gems are:</p>
  
  <pre><code>gem 'fog', require: 'fog/google'
  gem 'google-api-client', '~&gt; 0.11.1'
  gem 'mime-types'
  </code></pre>
  
  <p>My output is always the same:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt;
      &lt;Error&gt;
          &lt;Code&gt;
            SignatureDoesNotMatch
           &lt;/Code&gt;
          &lt;Message&gt;
            The request signature we calculated does not match the 
            signature you provided. Check your Google secret key and signing 
            method. 
          &lt;/Message&gt;
          &lt;StringToSign&gt;
            PUT\n\nimage/jpeg\nWed, 13 Feb 2019 09:36:19 +0000\nx-goog-acl:public-read\n/gomes-commerce/uploads%2Fproduct%2Fimage%2F17%2Fscp_shirt.jpg
          &lt;/StringToSign&gt;
     &lt;/Error&gt;
  </code></pre>
  
  <p>I'm trying to figure this out for more than 48h now. 
  I wouldn't come here &amp; open a topic if there was any reference on SO that is working for my case.
  Please help! :)</p>
  
  <p>Thanks in advance.</p>