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

"key_id" wasn't supplied #2

Closed
FeldhackerChrisPFG opened this issue Apr 9, 2021 · 1 comment
Closed

"key_id" wasn't supplied #2

FeldhackerChrisPFG opened this issue Apr 9, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@FeldhackerChrisPFG
Copy link
Contributor

I'm trying to use the action from an internal repository using a PAT rather then the standard GITHUB_TOKEN, which does not have enough permission to update the secret. I don't think this really relevant, but wanted to mention it.

When running the action the error is received (repeated twice):

Error: Invalid request.
"key_id" wasn't supplied.

A key_id parameter is identified in the document:
https://docs.github.com/en/rest/reference/actions#create-or-update-a-repository-secret

Code in other projects that update secrets similarly are passing a key_id parameter:
https://github.com/softprops/aws-credential-rotary/blob/main/src/secrets.ts (line 53)

Proposed solution:
In index.ts, I think another parameter is needed after line 81:
key_id: publicKey.key_id

ryanvade added a commit that referenced this issue Apr 11, 2021
@ryanvade
Copy link
Owner

Thanks for pointing that out, I don't think the key_id was required when I first made this action.

I do not know how PATs will work with the action, it should be fine assuming you can get octokit to authenticate with it.

This action needs to be slightly re-worked to support newer GitHub features such as Environments but that is a different issue. This one has been fixed.

@ryanvade ryanvade added the bug Something isn't working label Apr 11, 2021
@ryanvade ryanvade self-assigned this Apr 11, 2021
FeldhackerChrisPFG pushed a commit to FeldhackerChrisPFG/aws-credentials-rotation-action that referenced this issue Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants