From ad051cf1e6769b9ff975108f013a039d7cd0f233 Mon Sep 17 00:00:00 2001 From: Paddy Foran Date: Tue, 7 Oct 2014 17:38:45 -0400 Subject: [PATCH] Update metadata server URL to be a FQDN. Without a fully qualified domain name, containers (like Docker) can't connect to the metadata server. Update the address for the metadata server to be a FQDN so containers can use the library. See #44. --- google/google.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google/google.go b/google/google.go index 6622e9a..b98ce81 100644 --- a/google/google.go +++ b/google/google.go @@ -103,7 +103,7 @@ func (c *ComputeEngineConfig) FetchToken(existing *oauth2.Token) (token *oauth2. if c.account != "" { account = c.account } - u := "http://metadata/computeMetadata/v1/instance/service-accounts/" + account + "/token" + u := "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/" + account + "/token" req, err := http.NewRequest("GET", u, nil) if err != nil { return