Skip to content

Commit 27aee40

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

File tree

7 files changed

+30
-170
lines changed

7 files changed

+30
-170
lines changed

samples/snippets/crop_hints/README.rst

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,34 +21,12 @@ Setup
2121
Authentication
2222
++++++++++++++
2323

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

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

5331
Install Dependencies
5432
++++++++++++++++++++

samples/snippets/detect/README.rst

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,34 +21,12 @@ Setup
2121
Authentication
2222
++++++++++++++
2323

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

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

5331
Install Dependencies
5432
++++++++++++++++++++

samples/snippets/document_text/README.rst

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,34 +21,12 @@ Setup
2121
Authentication
2222
++++++++++++++
2323

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

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

5331
Install Dependencies
5432
++++++++++++++++++++

samples/snippets/face_detection/README.rst

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -22,34 +22,12 @@ Setup
2222
Authentication
2323
++++++++++++++
2424

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

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

5432
Install Dependencies
5533
++++++++++++++++++++

samples/snippets/quickstart/README.rst

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -21,34 +21,12 @@ Setup
2121
Authentication
2222
++++++++++++++
2323

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

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

5331
Install Dependencies
5432
++++++++++++++++++++
@@ -85,13 +63,6 @@ To run this sample:
8563
8664
$ python quickstart.py
8765
88-
Labels:
89-
cat
90-
photo caption
91-
small to medium sized cats
92-
cat like mammal
93-
whiskers
94-
9566
9667
9768

samples/snippets/quickstart/README.rst.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,5 @@ setup:
2323
samples:
2424
- name: Quickstart
2525
file: quickstart.py
26-
show_help: True
2726

2827
cloud_client_library: true

samples/snippets/web/README.rst

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,34 +21,12 @@ Setup
2121
Authentication
2222
++++++++++++++
2323

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

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

5331
Install Dependencies
5432
++++++++++++++++++++

0 commit comments

Comments
 (0)