mirror of
https://github.com/nektos/act.git
synced 2026-04-26 09:25:54 +03:00
[GH-ISSUE #1697] fatal: not a git repository #840
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#840
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 @haosenge on GitHub (Mar 25, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1697
Bug report info
Command used with act
Describe issue
I tried to test a simple Github Action workflow but ran into this "fatal: not a git repository" error constantly.
It seems that there is no ".git" folder in the container which causes all sorts of problems.
The job is just to get the changed file names but there is no commit history to be compared.
The workflow always stops at the following error message
I have tried upgrading git before running any git operations but nothing works so far. I would really appreciate some help. Thank you very much!
Link to GitHub repository
No response
Workflow content
Relevant log output
Additional information
No response
@MatteoGioioso commented on GitHub (Apr 12, 2023):
Have you tried this workaround? https://github.com/actions/checkout/issues/363#issuecomment-1163942488
For me it did not work, I am trying to establish whether it is a bug in act or in checkoutv2
@haosenge commented on GitHub (Apr 13, 2023):
Yes, I have tried that. But it didn't work for me either.
@ceciliacsilva commented on GitHub (Jun 9, 2023):
I have the same problem. The workaround described above https://github.com/actions/checkout/issues/363#issuecomment-1163942488 worked on the
remote CIbut it didn't work with locallyact.@github-actions[bot] commented on GitHub (Dec 7, 2023):
Issue is stale and will be closed in 14 days unless there is new activity
@CEbbinghaus commented on GitHub (Sep 2, 2024):
Unfortunate that this issue was marked as stale was closed given that its still a problem. Just started happening to me.
Edit: In my case it was forgetting that the checkout action was gated behind
if: !{{env.ACT}}. I think checkout used to not work in old versions of ACT and it would just copy the current directory but it seems to work fine once that is removed.@gastmaier commented on GitHub (Mar 17, 2025):
On my side it was .gitignore
.*rule, due to--use-gitignore Controls whether paths specified in .gitignore should be copied into container (default true)