must specify exactly one of "workload_identity_provider" or "credentials_json" error when only "credentials_json" is set

This issue has been tracked since 2022-12-31.


I'm seeing the must specify exactly one of "workload_identity_provider" or "credentials_json", but only have credentials_json set in the action config. I have also tried credentials_json and service_account and get the same result.

Expected behavior

No response

Observed behavior

No response

Action YAML

name: Example GCP Auth Login

      - main

    runs-on: ubuntu-latest
    name: GCP Login
      - name: Checkout code
        uses: actions/[email protected]
      - name: Authenticate to Google Cloud
        uses: google-github-actions/[email protected]
          credentials_json: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }}

Log output

Error: google-github-actions/auth failed with: retry function failed after 1 attempt: the GitHub Action workflow must specify exactly one of "workload_identity_provider" or "credentials_json"! If you are specifying input values via GitHub secrets, ensure the secret is being injected into the environment. By default, secrets are not passed to workflows triggered from forks, including Dependabot.

Additional information

No response

github-actions[bot] wrote this answer on 2023-01-02

Hi there @samlaycock 👋!

Thank you for opening an issue. Our team will triage this as soon as we can. Please take a moment to review the troubleshooting steps which lists common error messages and their resolution steps.

samlaycock wrote this answer on 2023-01-02

Not entirely sure what was causing the issue, but hard coding the workload identity pool values in the config has fixed my issue.

sethvargo wrote this answer on 2023-01-02

If you were specifying the value via a GitHub Secret previously, it probably means you were triggering the run from a pull request or fork which does not have access to secrets.

More Details About Repo
Owner Name google-github-actions
Repo Name auth
Full Name google-github-actions/auth
Language TypeScript
Created Date 2021-09-16
Updated Date 2023-03-24
Star Count 573
Watcher Count 16
Fork Count 116
Issue Count 3


Issue Title Created Date Updated Date