I have an app engine project, I want to access my google cloud storage default bucket. The first step of getting a Credential object fails, doing the following on a live instance:
Credential creds = GoogleCredential.getApplicationDefault();
The exception message I get:
"The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information."
The doc here says that production app engine projects should have access to the default credentials?:
https://developers.google.com/identity/protocols/application-default-credentials
"3. If you are running in Google App Engine production, the built-in service account associated with the application will be used."
Is there some setup I'm missing?
My app engine version (gradle):
com.google.appengine:appengine-java-sdk:1.9.18
and google cloud storage lib version:
com.google.apis:google-api-services-storage:v1-rev35-1.20.0
Thanks
export GOOGLE_APPLICATION_CREDENTIALS=/Users/googleCredentials.json
– Yogesh Patil