v1 does not authenticate for gsutil cp

This issue has been tracked since 2022-11-09.


bumped auth and setup actions to v1
I use json service account
right after these actions I run gsutil cp
401 Anonymous caller does not have storage.objects.get access to the Google Cloud Storage object.

works fine with v1

Expected behavior

should run gsutil cp as authenticated caller

Observed behavior

runs gsutil cp as anonymous caller

Action YAML

- name: Authenticate to gcloud
  uses: "google-github-actions/[email protected]"
    credentials_json: "${{ secrets.GCP_SERVICE_ACCOUNT }}"
- uses: 'google-github-actions/[email protected]'
- name: Decrypt
  run: yarn decrypt --${{ env.DEPLOYMENT_ENVIRONMENT }} - this one uses gsutil cp
- name: Deploy
  uses: 'google-github-actions/[email protected]'
    project_id: ${{ secrets.PROJECT_ID }}
    deliverables: ${{ secrets.APP_CONFIG }}

Log output

No response

Additional information

No response

sethvargo wrote this answer on 2022-11-25

Hi there @OleksiiKachan 👋!

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. Having the debug logs would be super helpful, especially if you can get logs as v0 vs v1.

Otterverse wrote this answer on 2022-11-25

I ran into the same problem. It's not logging in an account. gcloud auth list returns empty, and gcloud info shows no account set. I fixed it in my workflows by adding a step after auth and gcloud setup that looks like this:

    - name: Fix Auth
      run: yes | gcloud auth login --cred-file="$GOOGLE_APPLICATION_CREDENTIALS"
sethvargo wrote this answer on 2022-11-25

@verbanicm FYI. We're not seeing this in our integration tests, but I'll try to reproduce tomorrow. If someone could get debug logs (especially compared to a working version), that'd be very helpful.

sethvargo wrote this answer on 2022-11-25

Hi @Otterverse

I believe we fixed this in setup-gcloud with 1.0.1 - could you please confirm?

OleksiiKachan wrote this answer on 2022-11-25

@sethvargo works for me now. thanks

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