export_default_credentials: true isn't setting $GOOGLE_APPLICATION_CREDENTIALS for later steps
See original GitHub issueTL;DR
I set export_default_credentials: true
, and in later steps test failed due to missing credentials.
Expected behavior
$GOOGLE_APPLICATION_CREDENTIALS
should be set with the credentials for all later steps.
Reproduction
Action YAML
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '270.0.0'
service_account_email: ${{ secrets.GCP_SA_STG_EMAIL }}
service_account_key: ${{ secrets.GCP_SA_STG_KEY }}
export_default_credentials: true
- name: set gcp cradentilas
run: gcloud info
- name: echo gcp cradentilas
run: echo this is ${GOOGLE_APPLICATION_CREDENTIALS}
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: mvn clean install --file pom.xml
Additional information I submitted in the past some PR that fixed it, when I run same action with that PR branch it works.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
export_default_credentials: true isn't setting $ ...
I set export_default_credentials: true , and in later steps test failed due to missing credentials. ... $GOOGLE_APPLICATION_CREDENTIALS should be ...
Read more >Setting GOOGLE_APPLICATION_CREDENTIALS for ...
client.ApplicationDefaultCredentialsError: The Application Default Credentials are not available. They are available if running in Google Compute Engine.
Read more >Error messages | Document AI
The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable ...
Read more >Google Cloud Application Default Credentials - PHP
Google Cloud Application Default Credentials (ADC) is a strategy to locate sources that contain secrets/key material to create credentials.
Read more >Get started with Cloud Firestore - Firebase
This quickstart shows you how to set up Cloud Firestore, add data, then view the data you just added in the Firebase console....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@brachi-wernick remove the second
actions/checkout@v2
. Performing a checkout resets the workspace, effectively deleting the cached credentials. Again, this works with your PR because the credentials are saved outside of the workspace.Note: the run failed because I do not have access to your bucket. However, the authentication is clearly selected as the error message now includes the service account name.
Please let me know if you have additional questions.
Hi @sethvargo. that helps! it works now! thanks on your help!