Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application default credentials read the wrong path on Google Compute Engine #35

Closed
cdsmith opened this issue Aug 18, 2016 · 2 comments
Closed
Assignees
Labels

Comments

@cdsmith
Copy link

cdsmith commented Aug 18, 2016

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...

@brendanhay brendanhay self-assigned this Aug 18, 2016
@brendanhay brendanhay added the bug label Aug 18, 2016
@brendanhay
Copy link
Owner

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

brendanhay added a commit that referenced this issue Sep 12, 2016
Add /computeMetadata/v1/ path prefix to metadata token refresh requests
@brendanhay
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants