Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not a git repository error with checkout v2 #126

Closed
gitfool opened this issue Dec 28, 2019 · 3 comments · Fixed by #127
Closed

Not a git repository error with checkout v2 #126

gitfool opened this issue Dec 28, 2019 · 3 comments · Fixed by #127
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@gitfool
Copy link

gitfool commented Dec 28, 2019

See gitfool/Cake.Dungeon workflow builds for commit 6a287dc:

The Docker build is failing with error:

fatal: not a git repository (or any parent up to mount point /)

This seems to be because, after I switched from checkout v1 to checkout v2, the git version used regressed from 2.24.0 to 2.17.1. All other builds above are still using git version 2.24.0.

Did something change on your end or am I missing something? 🤔

@gitfool
Copy link
Author

gitfool commented Dec 28, 2019

I checked and can confirm that my Docker build container (Dockerfile) has git version 2.17.1 installed.

So I guess that git used to be host mounted into the build container but that is no longer the case? If so, is such a change documented somewhere?

gitfool added a commit to gitfool/cake-docker that referenced this issue Dec 29, 2019
@ericsciple
Copy link
Contributor

@gitfool you are correct. V1 was a plugin built-in to the runner. When using the job-container feature, checkout v1 runs on the host. V2 is a javascript action (so will run in the job container). When git 2.18 isnt in the PATH, the action falls back to downloading via the REST API.

I'll update the docs, it's interesting for folks migrating from v1 and using job-container.

@ericsciple ericsciple self-assigned this Jan 2, 2020
@ericsciple ericsciple added the documentation Improvements or additions to documentation label Jan 2, 2020
@ValeriuCoban
Copy link

ValeriuCoban commented Feb 20, 2020

Hey I have the same issue when I run the job on a self hosted runner. The .git folder is just missing.. What can be the reason ? Thanks in advance

Update: Fixed by moving git from 2.17 to the latest one

lcolladotor added a commit to lcolladotor/biocthis that referenced this issue May 8, 2020
AustinShalit added a commit to AustinShalit/docker-images that referenced this issue Jul 11, 2020
GitHub's actions/checkout requires git version 2.18 or later. we currently have 2.17 installed. The associated issue is here: actions/checkout#126
PeterJohnson pushed a commit to wpilibsuite/docker-images that referenced this issue Jul 11, 2020
GitHub's actions/checkout requires git version 2.18 or later. we currently have 2.17 installed. The associated issue is here: actions/checkout#126
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants