title: SSL: no alternative certificate subject name matches target host name $name.storage.googleapis.com
body: <p>I want to run tensorflow traning script in google cloud ml. One of the buckets from an external project. I have created cloud ml engine service account and add it as an user to this external project. </p>
  
  <p>After that, have executed the following command in my terminal with gcloud initialised project:</p>
  
  <pre><code>gcloud auth activate-service-account --my-service-acc-key.json
  </code></pre>
  
  <p>And then submit my job as:</p>
  
  <pre><code>gcloud ml-engine jobs submit training ..arguments
  </code></pre>
  
  <p>Job was submitted successfully and was running until accessing resources from external bucket with <code>file_io.FileIO('gs://external-bucket')</code></p>
  
  <p>I got the following error <code>SSL: no alternative certificate subject name matches target host ${bucket-name}.storage.googleapis.com</code> instead.</p>
  
  <p>Looks like something wrong with credentials, but can't find anything useful in documentation.</p>
  
  <p>What could be a problem?</p>