Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java: How to set GOOGLE_APPLICATION_CREDENTIALS on Mac Sierra

I read documentation here and tried to use Terminal export GOOGLE_APPLICATION_CREDENTIALS=/path/to/json/file.json But when I open new terminal and type: echo $GOOGLE_APPLICATION_CREDENTIALS it doesn't display the path that I set. The program always says: The Application Default Credentials are not available. Do you have any idea why export command doesn't work ?

like image 972
V.Tran Avatar asked Jun 04 '17 05:06

V.Tran


1 Answers

I solved using the terminal command

gcloud auth application-default login
like image 177
Fernando Magno Avatar answered Oct 06 '22 17:10

Fernando Magno