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.
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.
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?
Hey Seth, thanks for your help. This is what I wish I saw in the troubleshooting checklist:
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.
|Issue Title||Created Date||Updated Date|