-
Notifications
You must be signed in to change notification settings - Fork 522
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
Can't resolve metadata server in ComputeTokenUrl #1179
Comments
Could you give me more background about how you're running into this?
|
Yes, it's a plain GCE with a VM, running on Windows Server 2012 R2 Datacenter.
I am fetching them using GetApplicationDefault()
|
As an aside, if you call However, for the moment, if you know you're running on GCE, you could try this workaround: var url = "http://169.254.169.254/computeMetadata/v1/instance/service-accounts/default/token";
var initializer = new ComputeCredential.Initializer(url);
var credential = new ComputeCredential(initializer); Then pass that to |
Thx for the workaround. |
Great - in that case, I'll leave this issue open for now, and we can modify that constant. |
Hi,
I have actually some servers in compute engine and i wanted to the use ComputeCredential to create my client but I get an error because the host "metadata" can't be resolved:
https://github.com/google/google-api-dotnet-client/blob/master/Src/Support/Google.Apis.Auth/OAuth2/GoogleAuthConsts.cs
It should not be "metadata.google.internal" instead?
Or directly the IP like you did in last realease in the ComputeCredential class?
public const string MetadataServerUrl = "http://169.254.169.254"; // IP address instead of name to avoid DNS resolution
https://github.com/google/google-api-dotnet-client/pull/1158/files
The text was updated successfully, but these errors were encountered: