Skip to content
This repository was archived by the owner on Dec 31, 2023. It is now read-only.

Commit a59ac9d

Browse files
author
Jon Wayne Parrott
authored
Update all generated readme auth instructions [(#1121)](GoogleCloudPlatform/python-docs-samples#1121)
Change-Id: I03b5eaef8b17ac3dc3c0339fd2c7447bd3e11bd2
1 parent 6ae3d14 commit a59ac9d

File tree

2 files changed

+10
-54
lines changed

2 files changed

+10
-54
lines changed

samples/snippets/v3/api-client/README.rst

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,12 @@ Setup
1717
Authentication
1818
++++++++++++++
1919

20-
Authentication is typically done through `Application Default Credentials`_,
21-
which means you do not have to change the code to authenticate as long as
22-
your environment has credentials. You have a few options for setting up
23-
authentication:
20+
This sample requires you to have authentication setup. Refer to the
21+
`Authentication Getting Started Guide`_ for instructions on setting up
22+
credentials for applications.
2423

25-
#. When running locally, use the `Google Cloud SDK`_
26-
27-
.. code-block:: bash
28-
29-
gcloud auth application-default login
30-
31-
32-
#. When running on App Engine or Compute Engine, credentials are already
33-
set-up. However, you may need to configure your Compute Engine instance
34-
with `additional scopes`_.
35-
36-
#. You can create a `Service Account key file`_. This file can be used to
37-
authenticate to Google Cloud Platform services from any environment. To use
38-
the file, set the ``GOOGLE_APPLICATION_CREDENTIALS`` environment variable to
39-
the path to the key file, for example:
40-
41-
.. code-block:: bash
42-
43-
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service_account.json
44-
45-
.. _Application Default Credentials: https://cloud.google.com/docs/authentication#getting_credentials_for_server-centric_flow
46-
.. _additional scopes: https://cloud.google.com/compute/docs/authentication#using
47-
.. _Service Account key file: https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount
24+
.. _Authentication Getting Started Guide:
25+
https://cloud.google.com/docs/authentication/getting-started
4826

4927
Install Dependencies
5028
++++++++++++++++++++

samples/snippets/v3/cloud-client/README.rst

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,34 +19,12 @@ Setup
1919
Authentication
2020
++++++++++++++
2121

22-
Authentication is typically done through `Application Default Credentials`_,
23-
which means you do not have to change the code to authenticate as long as
24-
your environment has credentials. You have a few options for setting up
25-
authentication:
22+
This sample requires you to have authentication setup. Refer to the
23+
`Authentication Getting Started Guide`_ for instructions on setting up
24+
credentials for applications.
2625

27-
#. When running locally, use the `Google Cloud SDK`_
28-
29-
.. code-block:: bash
30-
31-
gcloud auth application-default login
32-
33-
34-
#. When running on App Engine or Compute Engine, credentials are already
35-
set-up. However, you may need to configure your Compute Engine instance
36-
with `additional scopes`_.
37-
38-
#. You can create a `Service Account key file`_. This file can be used to
39-
authenticate to Google Cloud Platform services from any environment. To use
40-
the file, set the ``GOOGLE_APPLICATION_CREDENTIALS`` environment variable to
41-
the path to the key file, for example:
42-
43-
.. code-block:: bash
44-
45-
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service_account.json
46-
47-
.. _Application Default Credentials: https://cloud.google.com/docs/authentication#getting_credentials_for_server-centric_flow
48-
.. _additional scopes: https://cloud.google.com/compute/docs/authentication#using
49-
.. _Service Account key file: https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount
26+
.. _Authentication Getting Started Guide:
27+
https://cloud.google.com/docs/authentication/getting-started
5028

5129
Install Dependencies
5230
++++++++++++++++++++

0 commit comments

Comments
 (0)