title: SSL: CERTIFICATE_VERIFY_FAILED on GAE/Go
body: <p>I am developing GAE/Go application and trying to connect Google Big Query from local development server.</p>
  
  <p>My code is like this.</p>
  
  <pre><code>import (
    "cloud.google.com/go/bigquery"
    "golang.org/x/net/context"
    "google.golang.org/api/option"
    gaeLog "google.golang.org/appengine/log"
    newappengine "google.golang.org/appengine"
  )
  
  func MyFunc(c *gin.Context) {
    r := c.Request
    ctx := newappengine.NewContext(r)
    client, err := bigquery.NewClient(ctx, PROJECT_ID, option.WithServiceAccountFile(SERVICE_ACCOUNT_JSON_FILE_PATH))
    if err != nil {
        (Error Handling)
    }
  
    tableList := client.Dataset(DATASET_ID).Tables(ctx)
    for {
      v, err := tableList.Next()
      if err == iterator.Done {
          break
      } else if err != nil {
          gaeLog.Errorf(ctx, "Failed to get meta-info: %v", err)
          return
      }
      :
    }
  }
  </code></pre>
  
  <p>I invoked local development server with <code>goapp.bat serve</code> command.
  When I posted a request, I got an error.</p>
  
  <pre><code>api_dev.go:344: ERROR: Failed to get meta-info: Get https://www.googleapis.com/bigquery/v2/projects/myproject/datasets/mydataset/tables?alt=json&amp;pageToken=: oauth2: cannot fetch token: Post https://accounts.google.com/o/oauth2/token: API error 6 (urlfetch: SSL_CERTIFICATE_ERROR): [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)
  </code></pre>
  
  <p>I googled "CERTIFICATE_VERIFY_FAILED", but all I can find is python program. My application is GAE/Go program.</p>
  
  <p>How can I avoid this error?</p>