-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
Token generated from GitHub App not working with push-to-fork #2848
Comments
Hi @AjayJagan Firstly, you should check that
The GH app should be installed in the repo where the workflow that needs to generate tokens is running. So it should be installed where the workflow runs, not the fork. By the way, are you manually triggering this workflow from the UI? Or are you triggering it in some other way? |
I can see that it is generating the tokens using
Also, I tried using this token for updating repo variables, creating pr in the same repo etc and it worked well 😅 |
This issue might be related: https://github.com/orgs/community/discussions/69154#discussioncomment-7191057 There might be similar settings on I don't know anything further to help you, but I think this use case is possible. It's just a matter of finding the right permissions and setup of the GH app. Please let me know if you manage to solve this. |
tried both, still the same issue :( |
Hi @AjayJagan For the upcoming v7 release I've been doing lots of testing and I think I understand why this wasn't working for you. I've managed to get GitHub App generated tokens working with Please read the new documentation for the v7 release at the following link. If it's not clear and you don't understand how it applies to your case, please let me know. You can try the release candidate for v7 like this: - uses: peter-evans/create-pull-request@v7-rc |
Sorry for the late reply but thanks for this @peter-evans :) |
Subject of the issue
GitHub App can be used as a service account to generate short-lived tokens in the workflows. While trying to use such a token to create a pull request in a remote repo + push-to-fork, it fails with the error:
Resource not accessible by integration
The fork exists in the same org, where the workflow runs and has the GH app installed in the fork repo.
Steps to reproduce
If this issue is describing a possible bug please provide (or link to) your GitHub Actions workflow.
Any help would be much appreciated :)
The text was updated successfully, but these errors were encountered: