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

RPM build job fails in ci: ERROR: git_dir_version: Not a Git repository. #908

Closed
jiridanek opened this issue Jan 19, 2023 · 3 comments · Fixed by #909
Closed

RPM build job fails in ci: ERROR: git_dir_version: Not a Git repository. #908

jiridanek opened this issue Jan 19, 2023 · 3 comments · Fixed by #909
Assignees
Milestone

Comments

@jiridanek
Copy link
Contributor

RPM build job fails in ci, https://github.com/skupperproject/skupper-router/actions/runs/3951927345/jobs/6766390478

$ rpkg spec --outdir /tmp/rpkg
ERROR: git_dir_version: Not a Git repository.
git_dir_version failed with value 1.

To investigate, add git status to ci script

$ git status
fatal: detected dubious ownership in repository at '/__w/skupper-router/skupper-router'
To add an exception for this directory, call:

	git config --global --add safe.directory /__w/skupper-router/skupper-router
@jiridanek jiridanek self-assigned this Jan 19, 2023
@jiridanek
Copy link
Contributor Author

Checkout action merged this 2 weeks ago, so maybe that's what is breaking us? actions/checkout#770

@jiridanek
Copy link
Contributor Author

jiridanek commented Jan 19, 2023

and also actions/checkout#766

note that

run: git config --global --add safe.directory ${{github.workspace}}

does not solve the problem, use pwd I guess

@jiridanek
Copy link
Contributor Author

lool, actions/checkout#760 so much comments

jiridanek added a commit to jiridanek/skupper-router that referenced this issue Jan 19, 2023
…workaround security

See actions/checkout#766 for what changes happened in git
jiridanek added a commit to jiridanek/skupper-router that referenced this issue Jan 20, 2023
jiridanek added a commit to jiridanek/skupper-router that referenced this issue Jan 20, 2023
safedir ?

safedir ?

safedir ?

Issue skupperproject#908 - Set checkout directory as git safe-dir to workaround security

See actions/checkout#766 for what changes happened in git
@ganeshmurthy ganeshmurthy added this to the 2.3.0 milestone Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants