How to add system variable in windows 10

1,260 views
Skip to first unread message

Litesh Ingale

unread,
Oct 9, 2017, 11:20:19 AM10/9/17
to gce-discussion
Hello,

I am currently using gcloud credentials for authentication. added system environment variable using below batch script.

SET GOOGLE_APPLICATION_CREDENTIALS="D:\GoogleAPIKey\Credentials.json"
SETX GOOGLE_APPLICATION_CREDENTIALS %GOOGLE_APPLICATION_CREDENTIALS% 
echo "Using Below Google Credentials.. " 
type %GOOGLE_APPLICATION_CREDENTIALS%

it is working fine as expected below is the snip.



but while running a maven bundle it is giving me below error.











from eclipse, it is running smoothly without any issue but after building runnable jar causing an issue with GOOGLE_APPLICATION_CREDENTIALS
Please suggest if I am missing something.


Navi Aujla (Google Cloud Support)

unread,
Oct 9, 2017, 2:37:37 PM10/9/17
to gce-discussion
Hello Litesh, 

You can refer to this documentation [1] to verify the calling method of the application default credentials in the application code.

However, as this seems like a question that would be better posted to stackoverflow.com with the right tags to seek assistance from technical community, rather than a google discussion post. This isn't the right place to look for 1-on-1 support, being the forum meant for the general discussion of the platform. 

[1] https://developers.google.com/identity/protocols/application-default-credentials

Litesh Ingale

unread,
Oct 9, 2017, 3:43:24 PM10/9/17
to gce-discussion
Hello Navi,

Thank you for your cooperation, I have walkthrough as mentioned by you, found appropriate answer on stackoverflow.com

Litesh,
Reply all
Reply to author
Forward
0 new messages