-
Notifications
You must be signed in to change notification settings - Fork 231
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
Missing input "github_token: ${{ secrets.GITHUB_TOKEN }}". #170
Comments
Hi @polina-c, I'll check that. Do you've tried it with the corresponding |
just checked: https://github.com/flutter-chat-dev/tic_tac_toe/actions/runs/5135574184/jobs/9241187446 The issue is different:
Yes, I want approval on main branch from people. |
@polina-c Is force push an option? |
Yes, force push is allowed in the repo. |
@ZPascal ? |
@polina-c That was just a guess whether it might work to bypass the branch protection rule. I am in the process of testing this right now. I will report when I have the results of my test. |
@polina-c I've got a solution for you. You need a personal access token, it's necessary to set up the branch protection rule "Allow force pushes" to "Specify who can force push" and set up your or own user. It's also better to specify the FYI: I've tested the solution inside this action run. |
Thank you! Can you outline exact steps in your README.md? |
@polina-c Sure, I'll adjust the documentation as a follow-up. |
@polina-c Can we close this issue? |
I checked the documentation. Is it correct understanding that I am missing 'force_with_lease: true' in my script? |
It seems personal access token is necessary. Any chance you can outline or link steps? |
In your test script dummy2 (that succeeded) still uses secrets.GITHUB_TOKEN, that is not custom access token, but is standard githib job access token. https://github.com/ZPascal/test_origin_push_action/blob/main/.github/workflows/test.yml Am I missing something? |
Hi @polina-c,
This relates to your case. I had the problem that it was not possible for me to push directly to the repository, and I had to use the force_with_lease option.
Yes, that is correct, the PAT is necessary for your case. I will create documentation on how to create the token and also publish it in the documentation of the action itself as a follow-up.
Yes, that's right, I've used the classical token to perform a checkout of the repository, but I've used the PAT for the push itself. If you have any further questions, please feel free to ping me. |
Hi @ZPascal, I think we've got the same problem there: We created an organization secret that isn't recognized apparently |
Hi @nriss, it's necessary that you've specified the corresponding custom token inside triggered workflow file or forward it to the other action inside the other repository. The default token It's in general necessary that you set up an custom personal access token and specify it as described in the following code sample or forward it to the executed GH Action at the end.
|
Hi~ I also meets this error, after I try to add PAT token when checkout, the push action is works well.
and also i tried without setting PAT token in |
@zhu-xiaowei I'm a bit surprised, because I've tested it my test case the mixture between default token and PAT. I'll set up a new test case to further investigate the topic. |
@ZPascal the Test1 with default GitHub token is failed with above error, and the Test2 with PAT is successful, the only difference of this two test is the token set in the checkout action. for more background information:
So, I think there may be some difference between my settings and your test case settings. |
@ZPascal I also test this case for only set the PAT as token in # Personal access token (PAT) used to fetch the repository. The PAT is configured
# with the local git config, which enables your scripts to run authenticated git
# commands. The post-job step removes the PAT. So, I think the reason is that the checkout action will set the PAT to the local git configuration and allow the following git commands to authenticate with the correct permissions. I don't know if |
Hi @zhu-xiaowei,
Yes, there is a difference. Unfortunately, I failed to specify the right branch inside my test case, which was in the end not protected. Especially for the
The FYI: I've already documented the corresponding hint inside the documentation. |
My repo: https://github.com/flutter-chat-dev/tic_tac_toe
Error: https://github.com/flutter-chat-dev/tic_tac_toe/actions/runs/5135214398/jobs/9240329007
Workflow:
Will appreciate help!!!
The text was updated successfully, but these errors were encountered: