brendanhay/gogol

Application default credentials read the wrong path on Google Compute Engine

Closed this issue · 2 comments

I'm trying to use gogol with GCE. I'm getting this error when connecting:

RetrievalError (StatusCodeException (Status {statusCode = 404, statusMessage = "Not Found"})

... and later on ...

The requested URL <code>/instance/service-accounts/default/token</code> was not found on this server.

...

("X-Request-URL","GET http://metadata.google.internal:80instance/service-accounts/default/token")

It looks like the correct path is this:

$ curl -H "Metadata-Flavor: Google" \
  http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token
<< a valid token >>

But it looks like gogol is missing part of the path. Or I'm doing something dumb...

Thanks for raising the issue! I'll look into it.

Apologies for the slow turn around, I'll get this onto Hackage shortly.