Application credentials do not work locally with App Engine by default

It is difficult to obtain the default credentials for the application to load the data stream into the SDK when the java application engine running on OS X is launched locally in the project. It works well when deployed.

Accordingly , the dev application server does not support them, and you should use the gcloud command-line tool command: gcloud preview app run , but according to the official Google group for the SDK , this command was deprecated here in January 2016.

So, I seem to be stuck between a stone and a hard place ... Does anyone know how to make the default credentials for an application work locally with an App Engine application?

I'm trying to use the Dataflow API, and it just throws up when it starts using the cloud storage api, which is the first thing Pipeline does, because it cannot load the correct credentials from environment variables (which are definitely set in the ENV and in the appengine- element web.xml <env-variables> ) or from the ~/.config/cloud/default_application_credentials.json file.

Hooray!

+5
source share
2 answers

This is fully supported (but poorly documented) within the application server. To this question you will find answers to all questions: Unable to access BigQuery from the local App Engine development server

+3
source

Can you try running the following command and see if it allows it?

 gcloud auth application-default login 
+2
source

Source: https://habr.com/ru/post/1243420/


All Articles