cmancone / akeyless-action

MIT License
6 stars 5 forks source link

[Error] Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable #1

Closed LanceMcCarthy closed 2 years ago

LanceMcCarthy commented 2 years ago

Hi!

I am just getting started with this Action, and thought I had finished configuring everything.

However, when it comes time for the Action to run, it fails with the following error on the akeyless-action step

Failed to login to AKeyless: Error: Failed to fetch Github JWT: Error message: Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable

Here's a screenshot against my step's settings so you can see I've set the other items.

image

I am using a secret for the access-id value, but I can confirm it is accurate.

If you would like to see the entire workflow, it is public here https://github.com/LanceMcCarthy/DevOpsExamples/blob/35bb29f339540bdb48eb12b14d0f5cd517e24575/.github/workflows/main_build-console.yml#L33

LanceMcCarthy commented 2 years ago

I just found the solution described in this thread https://github.com/glassechidna/ghaoidc/issues/1, then I visited your other live demo repo and noticed the permissions set there, too.

Updated my workflow to use the following and it succeeds.

image

I would recommend adding this to the README or have an FAQ with the error message. Many devs who frequently write workflows will skip right to your custom step and miss the permissions at the top of the job. Thank you!