github-app-token
github-app-token copied to clipboard
Installation ID maybe not following github_api_url
Very excited to see the V2 update features!
I'm using GitHub Enterprise server. It looks like the update may not be following the github_api_url
input. Tried with both retrieval mode=organization (gets a 404, but no useful log) & mode=id (log below).
Would also be useful to get an example of what "JSON-stringified permissions" should look like. I used '{ "metadata": "read","contents": "read"}'
Thanks!
Run tibdex/github-app-token@v2
Error: Could not create installation access token.
at createInstallationAccessToken (file:///home/runner/work/_actions/tibdex/github-app-token/v2/dist/main/index.js:9:86267)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///home/runner/work/_actions/tibdex/github-app-token/v2/dist/main/index.js:9:875[18](https://github.com/bosch-tamer/arc-runner/actions/runs/6421442387/job/17435810580#step:2:19)
at async run (file:///home/runner/work/_actions/tibdex/github-app-token/v2/dist/main/index.js:9:88811)
at async file:///home/runner/work/_actions/tibdex/github-app-token/v2/dist/main/index.js:9:87468 {
[cause]: RequestError [HttpError]: Not Found
at file:///home/runner/work/_actions/tibdex/github-app-token/v2/dist/main/index.js:1:64431
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async createInstallationAccessToken (file:///home/runner/work/_actions/tibdex/github-app-token/v2/dist/main/index.js:9:861[19](https://github.com/bosch-tamer/arc-runner/actions/runs/6421442387/job/17435810580#step:2:20))
at async file:///home/runner/work/_actions/tibdex/github-app-token/v2/dist/main/index.js:9:87518
at async run (file:///home/runner/work/_actions/tibdex/github-app-token/v2/dist/main/index.js:9:88811)
at async file:///home/runner/work/_actions/tibdex/github-app-token/v2/dist/main/index.js:9:87468 {
status: 404,
response: {
url: 'https://api.github.com/app/installations/[26](https://github.com/bosch-tamer/arc-runner/actions/runs/6421442387/job/17435810580#step:2:27)32/access_tokens',
status: 404,
headers: [Object],
data: [Object]
},
request: {
method: 'POST',
url: 'https://api.github.com/app/installations/2632/access_tokens',
headers: [Object],
body: '{"permissions":{"metadata":"read","contents":"read"}}',
request: [Object]
}
}
}
Same issue on my GH organization
github_api_url
is passed here:
https://github.com/tibdex/github-app-token/blob/3eb77c7243b85c65e84acfa93fdbac02fb6bd532/src/create-installation-access-token.ts#L28-L37
Maybe something changed in recent versions of @octokit/auth-app
and this has to be done differently.
Could one of you please take a look?
The base url is not working as expected.
I had the same issue earlier, and it turned out I had created but not installed my org-specific app. Perhaps this is the issue for you as well?
Related: https://github.com/actions/create-github-app-token/issues/76