title: How can I resolve "HttpError: Anonymous caller does not have storage.objects.get access to the Google Cloud Storage object., 401" error?
body: <p><strong>The problem:</strong>
  I'm trying to read in a .gz JSON file that is stored in one of my project's cloud storage bucket using a google colab python notebook and I keep getting this error:</p>
  <pre><code>HttpError: Anonymous caller does not have storage.objects.get access to the Google Cloud Storage object., 401
  </code></pre>
  <p><strong>My code:</strong></p>
  <pre><code>fs = gcsfs.GCSFileSystem(project='my-project')
  with fs.open('bucket/path.json.gz') as f:
      gz = gzip.GzipFile(fileobj=f) 
      file_as_string = gz.read()
      json_a = json.loads(file_as_string)
  </code></pre>
  <p><strong>I've tried all of these authentication methods and still get the same 401 error :</strong></p>
  <pre><code>!gcloud auth login
  !gcloud auth list
  !gcloud projects list
  !gcloud config set project 'myproject-id'
  </code></pre>
  <hr />
  <pre><code>from google.colab import auth
  auth.authenticate_user()
  </code></pre>
  <hr />
  <pre><code>!gcloud config set account 'my GCP email'
  </code></pre>
  <hr />
  <pre><code>!gcloud auth activate-service-account
  </code></pre>
  <hr />
  <pre><code>!gcloud auth application-default login
  </code></pre>
  <hr />
  <pre><code>!gsutil config
  </code></pre>
  <hr />
  <pre><code>!gcloud config set pass_credentials_to_gsutil false
  </code></pre>
  <hr />
  <pre><code>!gsutil config -a
  </code></pre>
  <p><strong>I've also set my GCP IAM permissions to:</strong></p>
  <ul>
  <li>Editor</li>
  <li>Owner</li>
  <li>Storage Admin</li>
  <li>Storage Object Admin</li>
  <li>Storage Object Creator</li>
  <li>Storage Object Viewer</li>
  <li>Storage Transfer Admin</li>
  </ul>