github-app-token: Action fails on ubuntu-jammy runner
Description
When using the action on a github runner with ubuntu-jammy (22.04) it fails with:
Error
Error: Error: error:25066067:DSO support routines:dlfcn_load:could not load the shared library
Usage
jobs:
build:
runs-on: ubuntu-jammy
steps:
- name: Generate token from github app
id: generate_token
uses: tibdex/github-app-token@v1.7
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_KEY }}
References
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 10
- Comments: 16 (2 by maintainers)
Commits related to this issue
- Upgrade octocat/auth-app Tries to help with #54 — committed to hamnis/github-app-token by hamnis a year ago
- PrivateKey変換エラーを修正 https://github.com/tibdex/github-app-token/issues/54#issuecomment-1470810318 — committed to T-School/discord by tex-tile-y a year ago
I’ve tested the v1.8. Now I’m facing this error when using the key which is created from the private keys section of the github app.
Running
v1.8
onubuntu-20.04
however works fine.I’m also getting this error, when will the fix be merged? Or is there any other workaround?
…
I faced it as well, then I realized that that value that you see above, is a hash shown on GitHub application page, rather than the key itself. The actual key is downloaded by your browser when you press “Generate private key” on GitHub App settings page (that’s a file that ends with .private-key.pem). Using that file as the key makes it work as expected.
Just wanted to note here that as mentioned above adding below to
generate_token
step fixes the issue withsecretOrPrivateKey must be an asymmetric key when using RS256
. Works for me on both 1.7.0 and 1.8.0 version with this workaround.@jazzlyn thanks for sharing! It worked for me too
@hamnis I got it to run with the action compiled locally, but got a different error
Sharing the code just for completeness
@hamnis I tried with your reference, still same error.
it seems this is an issue with node 16 and openssl, see https://stackoverflow.com/questions/72104449/node-js-crypto-fails-to-sign-pem-key-string-from-file-with-error25066067dso-su fixe
fixed it for me.
Thanks for looking it up for me. This way I tried first and it didn’t work producing the following error
I tried branch, sha, and local copy - it needs to be compiled like you said in your other reply.