mirror of
https://github.com/nektos/act.git
synced 2026-04-26 17:35:49 +03:00
[GH-ISSUE #425] Private Repo Checkout #296
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#296
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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?
@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.envThis 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