Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post Clean Up Issue #411

Closed
juliusoh opened this issue May 6, 2024 · 10 comments
Closed

Post Clean Up Issue #411

juliusoh opened this issue May 6, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@juliusoh
Copy link

juliusoh commented May 6, 2024

TL;DR

Error: google-github-actions/auth post failed with: failed to remove "/home/runner/work//gha-creds-7d2206b70566553e.json": EACCES: permission denied, unlink '/home/runner/work//gha-creds-7d2206b70566553e.json'

Expected behavior

No response

Observed behavior

No response

Action YAML

permissions:
      contents: read
      id-token: write
    runs-on: ubuntu-latest
    environment:
      name: stage

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Authenticate to Google Cloud
        uses: google-github-actions/auth@v2
        with:
          credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}

Log output

No response

Additional information

No response

@juliusoh juliusoh added the bug Something isn't working label May 6, 2024
Copy link

github-actions bot commented May 6, 2024

Hi there @juliusoh 👋!

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.

@sethvargo
Copy link
Member

Are you using self-hosted runners? Does this happen all the time? Please provide the full debug logs.

@juliusoh
Copy link
Author

juliusoh commented May 6, 2024

Are you using self-hosted runners? Does this happen all the time? Please provide the full debug logs.

These are GitHub hosted runners and happens all the time

@sethvargo
Copy link
Member

sethvargo commented May 6, 2024

Could you please provide the full debug logs? They are instructions in the Troubleshooting steps above. Please also provide your complete action.yml.

@jacek-jablonski
Copy link

Same problem here. I sent the debug logs by email as instructed.

@lucianxquatium
Copy link

lucianxquatium commented May 7, 2024

Same here. It started to fail 4 days ago. Followed the troubleshooting guide but nothing helped.

We are also using a GH-hosted runner, not the latest version, and it happens all the time.
For authentication, we use WIP with a SA.

  job-name:
    runs-on: ubuntu-20.04
    permissions:
      id-token: 'write'
      contents: 'read'

    steps:
      - name: Checkout source code
        uses: actions/checkout@v4
      
      - name: Authenticate to Google Cloud
        uses: 'google-github-actions/auth@v2'
        with:
          create_credentials_file: 'true'
          workload_identity_provider: 'projects/....../providers/githubwif'
          service_account: '......iam.gserviceaccount.com'

@sethvargo
Copy link
Member

Hmm - thank you for sharing those logs. Confirming I got them. What's strange is that nothing has changed in this GitHub Action since Feb 25, so I'm wondering if this is a change on GitHub's end? There was a runner release 5 days ago. I don't see how that diff could cause this, but ¯_(ツ)_/¯.

@jacek-jablonski @lucianxquatium was this previously working? If you have a successful workflow run, can you send me the logs (ideally that include the GitHub Actions Runner version)? I'm thinking something changed on GitHub's end, probably unintentionally.

@jacek-jablonski
Copy link

Hi @sethvargo,
freezing runner version didn't fix the problem. However, I noticed another issue that is the cause for us: gruntwork-io/terragrunt-action#64
So my problem is caused by terragrunt-action changing permissions.

@lucianxquatium
Copy link

lucianxquatium commented May 8, 2024

Hi, @sethvargo, on the same runner version, it was previously working and started to fail once terragrunt-action@v2.1.1 was released few days ago. Same as @jacek-jablonski described above.

Many thanks, @jacek-jablonski! Downgrading terragrunt-action to 2.1.0 worked. 💪

@sethvargo
Copy link
Member

Ah interesting. Unfortunately there's nothing we can do in auth to address this, since gruntworks is modifying the file permissions in a way that we cannot cleanup. If you're using GitHub-hosted runners, you can disable the credential cleanup. This is highly discouraged on self-hosted runners though, since it will persist credentials between runs. I see gruntwork-io/terragrunt-action#64 is filed upstream.

@sethvargo sethvargo closed this as not planned Won't fix, can't repro, duplicate, stale May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

4 participants