Is there a way calling FindDefaultCredentials successfully using 2nd gen local app engine (dev_appserver.py)?
up vote
1
down vote
favorite
I'm developing an app engine application using the "go111" runtime. According to Migrating your App Engine app from Go 1.9 to Go 1.11 the datastore should be done using package datastore. However, calling google.FindDefaultCredentials fails with "could not find default credentials".
Any ideas how to access the cloud datastore using default credentials?
add a comment |
up vote
1
down vote
favorite
I'm developing an app engine application using the "go111" runtime. According to Migrating your App Engine app from Go 1.9 to Go 1.11 the datastore should be done using package datastore. However, calling google.FindDefaultCredentials fails with "could not find default credentials".
Any ideas how to access the cloud datastore using default credentials?
Have you tried usinggoogle.DefaultCredentials? I thought theFindDefaultCredentialsmethod was more for the flex env, but it looks like you might be using the standard env.
– poy
Nov 16 at 21:59
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm developing an app engine application using the "go111" runtime. According to Migrating your App Engine app from Go 1.9 to Go 1.11 the datastore should be done using package datastore. However, calling google.FindDefaultCredentials fails with "could not find default credentials".
Any ideas how to access the cloud datastore using default credentials?
I'm developing an app engine application using the "go111" runtime. According to Migrating your App Engine app from Go 1.9 to Go 1.11 the datastore should be done using package datastore. However, calling google.FindDefaultCredentials fails with "could not find default credentials".
Any ideas how to access the cloud datastore using default credentials?
edited 2 days ago
asked Nov 16 at 21:27
Robert
7110
7110
Have you tried usinggoogle.DefaultCredentials? I thought theFindDefaultCredentialsmethod was more for the flex env, but it looks like you might be using the standard env.
– poy
Nov 16 at 21:59
add a comment |
Have you tried usinggoogle.DefaultCredentials? I thought theFindDefaultCredentialsmethod was more for the flex env, but it looks like you might be using the standard env.
– poy
Nov 16 at 21:59
Have you tried using
google.DefaultCredentials? I thought the FindDefaultCredentials method was more for the flex env, but it looks like you might be using the standard env.– poy
Nov 16 at 21:59
Have you tried using
google.DefaultCredentials? I thought the FindDefaultCredentials method was more for the flex env, but it looks like you might be using the standard env.– poy
Nov 16 at 21:59
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
Set the GOOGLE_APPLICATION_CREDENTIALS environment variable before starting your application.
With the second generation runtime, if you aren't using any google.golang.org/appengine APIs, you do not need to use dev_appserver.py -- you can build and start your application normally (go build and/or go run).
Also, it's very uncommon to explicitly pass the credentials. cloud.google.com/go APIs should all automatically find your credentials for you. When you're running locally, setting the GOOGLE_APPLICATION_CREDENTIALS and GOOGLE_CLOUD_PROJECT environment variables should be enough to get running. See https://cloud.google.com/docs/authentication/production#obtaining_credentials_on_app_engine_standard_environment (note the comment about this being uncommon).
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Set the GOOGLE_APPLICATION_CREDENTIALS environment variable before starting your application.
With the second generation runtime, if you aren't using any google.golang.org/appengine APIs, you do not need to use dev_appserver.py -- you can build and start your application normally (go build and/or go run).
Also, it's very uncommon to explicitly pass the credentials. cloud.google.com/go APIs should all automatically find your credentials for you. When you're running locally, setting the GOOGLE_APPLICATION_CREDENTIALS and GOOGLE_CLOUD_PROJECT environment variables should be enough to get running. See https://cloud.google.com/docs/authentication/production#obtaining_credentials_on_app_engine_standard_environment (note the comment about this being uncommon).
add a comment |
up vote
0
down vote
Set the GOOGLE_APPLICATION_CREDENTIALS environment variable before starting your application.
With the second generation runtime, if you aren't using any google.golang.org/appengine APIs, you do not need to use dev_appserver.py -- you can build and start your application normally (go build and/or go run).
Also, it's very uncommon to explicitly pass the credentials. cloud.google.com/go APIs should all automatically find your credentials for you. When you're running locally, setting the GOOGLE_APPLICATION_CREDENTIALS and GOOGLE_CLOUD_PROJECT environment variables should be enough to get running. See https://cloud.google.com/docs/authentication/production#obtaining_credentials_on_app_engine_standard_environment (note the comment about this being uncommon).
add a comment |
up vote
0
down vote
up vote
0
down vote
Set the GOOGLE_APPLICATION_CREDENTIALS environment variable before starting your application.
With the second generation runtime, if you aren't using any google.golang.org/appengine APIs, you do not need to use dev_appserver.py -- you can build and start your application normally (go build and/or go run).
Also, it's very uncommon to explicitly pass the credentials. cloud.google.com/go APIs should all automatically find your credentials for you. When you're running locally, setting the GOOGLE_APPLICATION_CREDENTIALS and GOOGLE_CLOUD_PROJECT environment variables should be enough to get running. See https://cloud.google.com/docs/authentication/production#obtaining_credentials_on_app_engine_standard_environment (note the comment about this being uncommon).
Set the GOOGLE_APPLICATION_CREDENTIALS environment variable before starting your application.
With the second generation runtime, if you aren't using any google.golang.org/appengine APIs, you do not need to use dev_appserver.py -- you can build and start your application normally (go build and/or go run).
Also, it's very uncommon to explicitly pass the credentials. cloud.google.com/go APIs should all automatically find your credentials for you. When you're running locally, setting the GOOGLE_APPLICATION_CREDENTIALS and GOOGLE_CLOUD_PROJECT environment variables should be enough to get running. See https://cloud.google.com/docs/authentication/production#obtaining_credentials_on_app_engine_standard_environment (note the comment about this being uncommon).
answered 12 hours ago
Tyler Bui-Palsulich
4968
4968
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53345640%2fis-there-a-way-calling-finddefaultcredentials-successfully-using-2nd-gen-local-a%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Have you tried using
google.DefaultCredentials? I thought theFindDefaultCredentialsmethod was more for the flex env, but it looks like you might be using the standard env.– poy
Nov 16 at 21:59