[GH-ISSUE #425] Private Repo Checkout #296

Closed
opened 2026-03-01 21:42:09 +03:00 by kerem · 1 comment
Owner

Originally created by @rahb3rt on GitHub (Nov 18, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/425

Hey guys,

I am new here, but I love the project. I was wondering does this support private repo checkout? in GH Actions I know I can checkout a private repo.

While I am successful in doing so, I get a message saying, "couldn't find action" even though in GH Actions my setup does work. So am I missing something?

Originally created by @rahb3rt on GitHub (Nov 18, 2020). Original GitHub issue: https://github.com/nektos/act/issues/425 Hey guys, I am new here, but I love the project. I was wondering does this support private repo checkout? in GH Actions I know I can checkout a private repo. While I am successful in doing so, I get a message saying, "couldn't find action" even though in GH Actions my setup does work. So am I missing something?
kerem closed this issue 2026-03-01 21:42:10 +03:00
Author
Owner

@ricktimmis commented on GitHub (Dec 23, 2020):

Hi I came across this issue too.

Runnning act with :

$ act -W .github/workflows/deploy-tf-test.yml --secret-file ~/Secrets.env

This fails with :

[Deploy via Terraform - WEB API - tf-test/build] Run Checkout repository
[Deploy via Terraform - WEB API - tf-test/build] ☁ git clone 'https://github.com/actions/checkout' # ref=v2
[Deploy via Terraform - WEB API - tf-test/build] 🐳 docker cp src=/home/rickgbi/.cache/act/actions-checkout@v2 dst=/actions/
[Deploy via Terraform - WEB API - tf-test/build] ::save-state name=isPost,::true
[Deploy via Terraform - WEB API - tf-test/build] 💬 ::debug::GITHUB_WORKSPACE = '/github/workspace'
[Deploy via Terraform - WEB API - tf-test/build] 💬 ::debug::qualified repository = 'doombung/api'
[Deploy via Terraform - WEB API - tf-test/build] 💬 ::debug::ref = 'tf-test'
[Deploy via Terraform - WEB API - tf-test/build] 💬 ::debug::commit = 'undefined'
[Deploy via Terraform - WEB API - tf-test/build] 💬 ::debug::clean = true
[Deploy via Terraform - WEB API - tf-test/build] 💬 ::debug::fetch depth = 1
[Deploy via Terraform - WEB API - tf-test/build] 💬 ::debug::lfs = false
[Deploy via Terraform - WEB API - tf-test/build] 💬 ::debug::submodules = false
[Deploy via Terraform - WEB API - tf-test/build] 💬 ::debug::recursive submodules = false
[Deploy via Terraform - WEB API - tf-test/build] ::error::Input required and not supplied: token
[Deploy via Terraform - WEB API - tf-test/build] Failure - Checkout repository

What is needed here is a GitHub access token, which can be acquired from :

https://docs.github.com/en/free-pro-team@latest/github/extending-github/git-automation-with-oauth-tokens

You'll need to reference this in your .github/workflows/actions.yml file. In my case I am using 'CheckoutV2'

https://github.com/actions/checkout

For example you can introduce the token via your Secrets.env file, where Secrets.env has an entry

GITHUB_REPO_ACCESS_TOKEN=t0k3nV@lue5tr1ng

like so:

name: Checkout repository
uses: actions/checkout@v2
with:
ref: tf-test
token: ${{ secrets.GITHUB_REPO_ACCESS_TOKEN }}`

Hope that helps

<!-- gh-comment-id:750303021 --> @ricktimmis commented on GitHub (Dec 23, 2020): Hi I came across this issue too. Runnning act with : `$ act -W .github/workflows/deploy-tf-test.yml --secret-file ~/Secrets.env` This fails with : [Deploy via Terraform - WEB API - tf-test/build] ⭐ Run Checkout repository [Deploy via Terraform - WEB API - tf-test/build] ☁ git clone 'https://github.com/actions/checkout' # ref=v2 [Deploy via Terraform - WEB API - tf-test/build] 🐳 docker cp src=/home/rickgbi/.cache/act/actions-checkout@v2 dst=/actions/ [Deploy via Terraform - WEB API - tf-test/build] ❓ ::save-state name=isPost,::true [Deploy via Terraform - WEB API - tf-test/build] 💬 ::debug::GITHUB_WORKSPACE = '/github/workspace' [Deploy via Terraform - WEB API - tf-test/build] 💬 ::debug::qualified repository = 'doombung/api' [Deploy via Terraform - WEB API - tf-test/build] 💬 ::debug::ref = 'tf-test' [Deploy via Terraform - WEB API - tf-test/build] 💬 ::debug::commit = 'undefined' [Deploy via Terraform - WEB API - tf-test/build] 💬 ::debug::clean = true [Deploy via Terraform - WEB API - tf-test/build] 💬 ::debug::fetch depth = 1 [Deploy via Terraform - WEB API - tf-test/build] 💬 ::debug::lfs = false [Deploy via Terraform - WEB API - tf-test/build] 💬 ::debug::submodules = false [Deploy via Terraform - WEB API - tf-test/build] 💬 ::debug::recursive submodules = false [Deploy via Terraform - WEB API - tf-test/build] ❗ ::error::Input required and not supplied: token [Deploy via Terraform - WEB API - tf-test/build] ❌ Failure - Checkout repository What is needed here is a GitHub access token, which can be acquired from : https://docs.github.com/en/free-pro-team@latest/github/extending-github/git-automation-with-oauth-tokens You'll need to reference this in your .github/workflows/actions.yml file. In my case I am using 'CheckoutV2' https://github.com/actions/checkout For example you can introduce the token via your Secrets.env file, where Secrets.env has an entry GITHUB_REPO_ACCESS_TOKEN=t0k3nV@lue5tr1ng like so: name: Checkout repository uses: actions/checkout@v2 with: ref: tf-test token: ${{ secrets.GITHUB_REPO_ACCESS_TOKEN }}` Hope that helps
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#296
No description provided.