Add example to TROUBLESHOOTING.md

This issue has been tracked since 2023-02-05.

TL;DR

The following would be a good addition to your checklist of things to check when things are not working. In spite of reading the docs and following instructions, I still managed to miss adding the following to my workflow yaml file:

    # Add "id-token" with the intended permissions.
    # See: https://github.com/google-github-actions/auth#usage
    permissions:
      contents: 'read'
      id-token: 'write'

The error message for this situation begins with: "Error: google-github-actions/auth failed with: retry function failed after 1 attempt"

The first day of doing something new and getting things working is the most vulnerable time for missing tiny things, and spending hours tracking it down. This would be helpful for those people. 😄

Detailed design

No response

Additional information

No response

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

Hi there @bseib 👋!

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 wrote this answer on 2023-02-24

Hi @bseib

The full error message should be:

Error: google-github-actions/auth failed with: retry function failed after 1 attempt: gitHub Actions did not inject $ACTIONS_ID_TOKEN_REQUEST_TOKEN or $ACTIONS_ID_TOKEN_REQUEST_URL into this job. This most likely means the GitHub Actions workflow permissions are incorrect, or this job is being run from a fork. For more information, please see https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token

And that links directly to GitHub's documentation. What additional troubleshooting information are you looking for?

bseib wrote this answer on 2023-02-24

Hey Seth, thanks for your help. This is what I wish I saw in the troubleshooting checklist:

image

And here's the PR for that suggestion: #262

It is simply another case that leads you to that error. And when I followed the troubleshooting checklist, if would have been super helpful to have found the solution there.

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

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date