mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #5962] Feature Request/Bug: Skipping actions/checkout prevents git authentication setup in act #1303
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#1303
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 @surgiie on GitHub (Oct 31, 2025).
Original GitHub issue: https://github.com/nektos/act/issues/5962
Act version
0.2.82
Feature/Issue Description
By default,
actcopies the local repository into the container, effectively skipping theactions/checkoutstep.However, part of that action’s logic is responsible for configuring Git authentication using the provided token or SSH key:
When this logic is skipped, any subsequent step that performs Git operations requiring authentication (for example,
git fetch origin <branch>) fails with:This occurs because while the repository contents are copied in, the authentication setup that
actions/checkoutnormally handles never runs.Workaround
You can force
actto run theactions/checkoutlogic by using:This works around the issue by performing a proper checkout and setting up credentials.
However, when using this approach you encounter what is another issue that is not necessarily related to the lack of git authentication setup but prevents a clean usage of act for local testing. That issue being that if the local repository contains uncommitted or unpushed commits,
actfails because those commits don’t exist on the remote.This results in errors like the ones reported in #2392 and discussion #2391:
This effectively forces users to push all local changes just to test workflows involving Git operations — defeating the purpose of running Actions locally.
Expected Behavior
This being said, i would be okay using the
--no-skip-checkoutas long as i didnt hit the issue where local commits have to be pushed up in order for act to work, again this defeats the whole "run actions locally" aspect of this tool. So in my opinionactshould provide a way to:actions/checkout.Ideally, there would be a flag or built-in mechanism that:
actions/checkoutcredential setup.Current Options
--no-skip-checkoutactions/checkoutlogic manuallyact-specific logicNeither option is ideal for local testing scenarios.
Proposed Solution
Add support or fixes for:
--setup-checkout-auth, that runs only the authentication setup portion ofactions/checkoutwithout doing a full remote fetch.actautomatically simulates checkout authentication setup when skipping the full checkout.