I am following the docs here and it says:
The simplest way for applications to authenticate to a Google Cloud Platform API service is by using Application Default Credentials (ADC). Services using ADC first search for credentials within a GOOGLE_APPLICATION_CREDENTIALS environment variable; Google Cloud recommends you set this environment variable to point to your service account key file (the .json file downloaded when you created a service account key, as explained in Set Up a Service Account.
And it says to use this command:
$ export GOOGLE_APPLICATION_CREDENTIALS=<path_to_service_account_file>
In the Google Shell, I have attempted this:
<INSERT_SOMETHING>"~$ $ export GOOGLE_APPLICATION_CREDENTIALS=</Users/grantespanet/Downloads/myfile.json>
But I get this error: -bash: syntax error near unexpected token newline
I have also tried this:
<INSERT_SOMETHING>:~$ $ export GOOGLE_APPLICATION_CREDENTIALS=/Users/grantespanet/Downloads/myfile.json
but nothing happens
I know the command is pointing to the correct file location. How can I successfully Authenticate Application Default Credentials?
gcloud auth application-default login
and that might have fixed my problem. @Fred – grantespo