checkout: ::error::Input required and not supplied: token
Hello everyone… I’m trying to fetch another public repo and I’ve tried to put the TOKEN as explained… but even if I do, for some odd reason is still TELLING ME that the token is missing??? Sorry but I’m a bit stressed about this 😕 perhaps I’m just being too dumb.
- name: Checks out flutter
uses: actions/checkout@v2
with:
repository: flutter/flutter
token: ${{ github.token }}
ref: refs/heads/master
path: flutter
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 28
- Comments: 35 (3 by maintainers)
Commits related to this issue
- [ci] add fix for missing secrets in 3rd party forks — committed to rectorphp/rector by TomasVotruba 4 years ago
- ci: make dependabot prs not fail See https://github.com/actions/checkout/issues/298 — committed to vega/vega-lite by domoritz 3 years ago
- fix(ci): prevent firebase deploy from github-action triggered by fork PRs more details: https://github.com/actions/checkout/issues/298#issuecomment-718197447 — committed to devizem/Eventure by vdias38 2 years ago
- Don't use personal PAT for forked PRs This change should fix https://github.com/beyarkay/eskom-calendar/issues/128 based on the comment in https://github.com/actions/checkout/issues/298#issuecomment-... — committed to beyarkay/eskom-calendar by beyarkay 2 years ago
- Don't use personal PAT for forked PRs This change should fix https://github.com/beyarkay/eskom-calendar/issues/128 based on the comment in https://github.com/actions/checkout/issues/298#issuecomment-... — committed to beyarkay/eskom-calendar by beyarkay 2 years ago
- chore: pass token to checkout Attempted fix for #52 based on this: https://github.com/orgs/community/discussions/26694#discussioncomment-3252934 — committed to Xyaneon/Xyaneon.Games.Cards by Xyaneon 2 years ago
- versatile-data-kit: dependabot auto-merge fix The auto-merge fails due `Error: Input required and not supplied: github-token` See https://github.com/vmware/versatile-data-kit/actions/runs/ 4295507705... — committed to vmware/versatile-data-kit by ivakoleva a year ago
- versatile-data-kit: dependabot auto-merge fix The auto-merge fails due `Error: Input required and not supplied: github-token` See https://github.com/vmware/versatile-data-kit/actions/runs/ 4295507705... — committed to vmware/versatile-data-kit by ivakoleva a year ago
- versatile-data-kit: dependabot auto-merge fix (#1688) The auto-merge fails due `Error: Input required and not supplied: github-token` See https://github.com/vmware/versatile-data-kit/actions/runs/4... — committed to vmware/versatile-data-kit by ivakoleva a year ago
- versatile-data-kit: dependabot auto-merge fix (#1688) The auto-merge fails due `Error: Input required and not supplied: github-token` See https://github.com/vmware/versatile-data-kit/actions/runs/4... — committed to vmware/versatile-data-kit by ivakoleva a year ago
- ci: Chart release only on push. Remove TOKEN from checkout. see - https://github.com/actions/checkout/issues/298 — committed to Randsw/kubeinfo by Randsw 8 months ago
- [github actions] Fix token issue on actions/checkout package (#141652) revision 01/17: instead of removing actions/checkout, keep actions/checkout but remove the `token` field and add `persist-creden... — committed to flutter/flutter by XilaiZhang 5 months ago
- Update validate.yml Fix for dependabot PRs: https://github.com/actions/checkout/issues/298#issuecomment-820748989 — committed to alexdelprete/ha-abb-powerone-pvi-sunspec by alexdelprete 5 months ago
- Update release.yml Fix for dependabot PRs: https://github.com/actions/checkout/issues/298#issuecomment-820748989 — committed to alexdelprete/ha-abb-powerone-pvi-sunspec by alexdelprete 5 months ago
- Update lint.yml Fix for dependabot PRs: https://github.com/actions/checkout/issues/298#issuecomment-820748989 — committed to alexdelprete/ha-abb-powerone-pvi-sunspec by alexdelprete 5 months ago
Fyi @TomasVotruba here is an even shorter workaround 😃 You can use the truthy behavior to fallback the built-in token
Sharing my fix for those (like me) who are hitting this during local dev with
act
(version 0.2.32). It was inspired by their docs:GITHUB_TOKEN
.repo
permissions (Full control of private repositories).export GITHUB_TOKEN="mySecret"
act -s GITHUB_TOKEN --container-architecture linux/amd64
--container-architecture linux/amd64
since I am using Mac M1This at least unblocked my personal usage of
act
. Hope it helps someone out.I started to have this issue in all the repositories which I set the token manually since yesterday or so. If I retrigger the build manually it works, also works sometimes automatically.
E.g. https://github.com/timonwong/vscode-shellcheck/runs/2077175092
This is not from fork, neither a pull request, so I wonder what’s happening.
It would be cool to get any feedback here. It isn’t very pleasant to constantly have to restart the workflows.
@ericsciple Could you please explain why that solves the issue? If
github.token
works, why don’t we directly usetoken: ${{ github.token }}
?EDIT: nevermind, turns out it’s by design: https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
Landed here from a google search for “octokit input required and not supplied”. Same issue as the previous two commenters, but I’m noticing this behavior in the https://github.com/actions/github-script action instead of checkout.
Error: Unhandled error: Error: Input required and not supplied: github-token
Maybe 5 or so days ago, I noticed my auto-merge jobs failing in this way when attempting to merge PRs from dependabot.
I was having the same problem with my private repo in my organization when using reusable workflows. I found out that reusable workflows do not pass the secrets by default from the caller workflow to the reusable workflow, instead, you have to pass the secrets according to this documentation using-inputs-and-secrets-in-a-reusable-workflow. Following the 3 steps I was able to solve my problem.
Basically, if you are using reusable workflows you have to:
Working for me, after changed event type pull_request to pull_request_target.
refer: https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
We’re encountering this issue too for almost a week now. It suddenly started without a change in our workflows.
I’m getting
From this workflow file:
I think the problem is actually mentioned on GitHub’s secrets page:
The “Learn more” links to this page that doesn’t provide more information but repeats the message: https://help.github.com/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets
I found this discussion on the topic of forks getting some secrets access as “security by obscurity” https://github.community/t/make-secrets-available-to-builds-of-forks/16166/32
I’m running into this issue in a private repository where a check is failing on pull requests opened by dependabot.
If I remove
from
the workflow still fails.
What’s the recommended approach on getting my workflow to run in my private repository, even if it’s opened by dependabot?
Suddenly got this on my repos (auto merging dependabot PRs) which worked fine for 6+months.
Hello everyone, for those
Here’s how my
.github/workflows/deployment.yml
looks like.As you notice the repository awslambda-psycopg2 is public, but based on the docs act provides
I understood that when your workflow runs in github actions it creates a token automatically on your user’s behalf, so to work this locally I created a PAT with no access what so ever and passed it as a secret to
act
and now it works as expected 🥳@felipecrs I looked at the run you linked, and it looks like it’s because you are using the
secrets
context and the run was triggered by dependabot.As @Xunnamius and @MannarAmuthan this behavior change is intentional and related to this recent change: https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
I’m going to close this issue. If anyone is still having an issue, please open a new issue.
In summary, this error is expected if you are attempting to use a secret on a fork PR or a run triggered by dependabot.
However i think just chaning the event type to pull_request_target is regarded as unsecure when you are using secrets in your workflow. Refer: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
This would mean anyone forking the repo could steal secrets and do any sort of malicious actions. I guess for private repos this will not exist but for public repos it will.
So any other solutions here?
Is this still an issue? I have the below that fails, even though the repository (
viaduct-ai/kustomize-sops
) is publicWorkflow:
FYI: I have done
brew unlink act && brew install act --HEAD
So far I’ve found this workaround: https://github.com/google/gvisor/commit/315c167de2acddeef90b2a4765c9736e35523129
Another shorter workaround: https://github.com/rectorphp/rector/commit/2243a814457690f61b38cfbb63421f7812a3b43c
Hi @cwong-archy, yes. According to the docs you have to define the secret inside the reusable workflow definition.
Same error here ):
It is clearly not fixed. I just added an organization secrets with a new PATH and I get that error. I’m unable to checkout a private repo (from the same organization) within my workflows.
edit: one job is using a workflow_call (using a workflow file from the same repo). Could that be the issue?