Forgejo supports OIDC. I was able to get a JWT token on Codeberg with this workflow:
on:
- push
# https://forgejo.org/docs/latest/user/actions/reference/#enable-openid-connect
#
# This adds ACTIONS_ID_TOKEN_REQUEST_URL that looks like
# <ACTIONS_ID_TOKEN_REQUEST_URL=https://codeberg.org/api/actions/_apis/pipelines/workflows/3705365/idtoken?placeholder=true>
# and
# <ACTIONS_ID_TOKEN_REQUEST_TOKEN>
enable-openid-connect: true
jobs:
test:
runs-on: codeberg-tiny-lazy
steps:
- run: |
curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=exampleCustomAudience" | jq -r .value
This gets me a JWT token that I can paste into https://it-tools.tech/jwt-parser and see "workflow" is "publish.yml", "repository" is the name of the user and repo, "ref" is "refs/heads/main" etc.
I want to use this similarly to GitHub Actions, but this step fails:
- name: Install opkssh
run: |
curl -sSLf https://github.com/openpubkey/opkssh/releases/download/v0.14.0/opkssh-linux-amd64 -o opkssh
chmod +x opkssh
./opkssh login github
Step prints:
2026/04/29 03:44:41 failed to find client config file to generate a default config, run `opkssh login --create-config` to create a default config file
2026/04/29 03:44:42 Error executing login command: error logging in: error requesting OIDC tokens from OpenID Provider: no matching public key found for kid XXXX
Error: error logging in: error requesting OIDC tokens from OpenID Provider: no matching public key found for kid XXXX
⚙️ [runner]: exitcode '1': failure
GitHub API seems similar: https://docs.github.com/en/actions/reference/security/oidc#methods-for-requesting-the-oidc-token
But maybe some other API is used in opkssh login github, because https://github.com/openpubkey/openpubkey/blob/d5b65c645acf59a8d415ad7acaa16fb5bb88dfc4/README.md mentions custom nonce and with curl I get a token without generating any nonce.
Forgejo supports OIDC. I was able to get a JWT token on Codeberg with this workflow:
This gets me a JWT token that I can paste into https://it-tools.tech/jwt-parser and see "workflow" is "publish.yml", "repository" is the name of the user and repo, "ref" is "refs/heads/main" etc.
I want to use this similarly to GitHub Actions, but this step fails:
Step prints:
GitHub API seems similar: https://docs.github.com/en/actions/reference/security/oidc#methods-for-requesting-the-oidc-token
But maybe some other API is used in
opkssh login github, because https://github.com/openpubkey/openpubkey/blob/d5b65c645acf59a8d415ad7acaa16fb5bb88dfc4/README.md mentions customnonceand withcurlI get a token without generating anynonce.