-
Notifications
You must be signed in to change notification settings - Fork 291
Authenticating via Service Account Key JSON does not work #73
Copy link
Copy link
Closed
google-github-actions/setup-gcloud
#426Labels
bugSomething isn't workingSomething isn't working
Description
TL;DR
Moving from deprecated service_account_key in the google-github-actions/setup-gcloud to the credentials_json gives me the following error:
Error: google-github-actions/setup-gcloud failed with: Error parsing credentials: Unexpected end of JSON input
Ensure your credentials are base64 encoded or validate JSON format:
I have also tried to encode the JSON key to base64 but it does not change the behaviour
Expected behavior
No response
Observed behavior
No response
Action YAML
name: Test on GKE
on:
push: {}
env:
PROJECT_ID: my-project
GKE_ZONE: europe-west1-b
jobs:
create-e-cluster:
name: Create GKE cluster
runs-on: ubuntu-latest
outputs:
cluster_name: my-cluster
steps:
# Setup gcloud CLI
- id: 'auth'
uses: 'google-github-actions/auth@v0.4.1'
with:
credentials_json: ${{ secrets.GOOGLE_CREDENTIALS }}
- uses: google-github-actions/setup-gcloud@master
with:
project_id: ${{ env.PROJECT_ID }}
export_default_credentials: trueAdditional information
It's not the issue with the JSON key itself, as the same value for the service_account_key in the google-github-actions/setup-gcloud is working.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working