Closed iamatib closed 4 months ago
Can you please setup a public repository that reproduces the problem? We can't help you with the information you provided. We use this action ourselves in conjunction with actions/checkout
, so it definitely works.
Hello @gr2m Thanks For you reply. https://github.com/iamatib/checkout-demo/actions
I have setup here, could you please have a look. The github app has "read" permission to all repo's.
I am trying checkout a private repo from the this repo https://github.com/iamatib/checkout-demo
could you please have a look.
Thanks in Advance.
Regards, Atib
You are trying to checkout iamatib/checkout-test
from iamatib/checkout-demo
, but the token that gets created only has access to the current repository unless you set owner
and/or repositories
. In your case, try this
on: [workflow_dispatch]
jobs:
hello-world:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
+ repositories: 'checkout-test`
- name: Checkout Repository
uses: actions/checkout@v3
with:
token: ${{ steps.app-token.outputs.token }}
repository: iamatib/checkout-test
Hello @gr2m
Thank You, I thought when we give permissions for repo's in Github App, it should already be authenticated to run api's. Yeah, now i got it why it was not working.
Will close the Issue.
Regards, Atib
Hi @gr2m
could we also rotate this private key in timely manner? is the rotation possible ?
Thanks in Advance. Regards, Atib
is the rotation possible ?
I don't think it's possible to programmatically change a GitHub App's private keys unfortunately. Repository secrets can be rotated though.
Thank You again..!
I am trying to checkout repo i github enterprise with this workflow, but i am getting the error as
Retrieving the default branch name Not Found
while i looked some other third party workflows, it worked. eg: https://github.com/peter-murray/workflow-application-token-actioncould you please help us here Regards, Atib