Sitelet https://github.com/googleapis/google-cloud-java/issues/331
Skip to content

We should mention GOOGLE_APPLICATION_CREDENTIALS in the Authentication section. #331

Description

@aozarov

The main gcloud-java README.md contains an authentication section however this section does not
mention the option of using the GOOGLE_APPLICATION_CREDENTIALS environment variable to point to a key file.

@mziccard I now wonder if we need the GCLOUD_TESTS_KEY and GCLOUD_TESTS_PROJECT_ID in the RemoteGcsHelper as GOOGLE_APPLICATION_CREDENTIALS could be used instead of the former and GCLOUD_PROJECT could be used instead of the latter.

Activity

  1. self-assigned this
    on Nov 6, 2015
  2. mziccard commented on Nov 6, 2015

    @mziccard
    Contributor

    @aozarov When I introduced those 2 variables I took inspiration from gcloud-node. The rationale is that to run integration tests the user must know what he is doing and he has to pick the right credentials/projectId before running tests as he is going to be billed for them.

    For instance I have a personal account on Google Cloud whose credentials are set in GOOGLE_APPLICATION_CREDENTIALS but I use different whitelisted credentials/project to run integration tests.

  3. jgeewax commented on Nov 6, 2015

    @jgeewax

    I'm with @aozarov on this one -- having separate env vars for tests seems a
    bit off.

    Running tests should look something like

    $ cat run_test.sh
    GOOGLE_APPLICATION_CREDENTIALS=test.json mvn test

    right?

  4. aozarov commented on Nov 6, 2015

    @aozarov
    ContributorAuthor

    Right, it should not be a problem to temporarily override environment variable.

  5. aozarov commented on Nov 6, 2015

    @aozarov
    ContributorAuthor

    I created #335 for tracking the RemoteGcsHelper specific keys issue.

  6. added a commit that references this issue on Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🚨 criticalP0 critical issue. Requires immediate fixauthtriage meI really want to be triaged.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions