CodeQL fails to get Git version

Closed
#3,962 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
git, github-actions
Domain
ci-cd

Research direction

Start with the linked GitHub Actions run and reproduce the CodeQL v4 warning about locating Git. Trace the CodeQL action's Git-version detection and fallback to the GitHub API; done means the warning is silenced without disrupting repository download or analysis.

Written by the indexing model from the issue text.

Description

Since about six months ago, CodeQL has been unable to automatically detect the Git version. This causes a warning to be thrown: https://github.com/primesearch/mfaktc/actions/runs/27564026256

Could not determine Git version: Unable to locate executable file: git. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.

It doesn't actually affect the workflow because the Action falls back to the GitHub API for downloading the repo. However, I'd like to silence the warning so that the workflow output is less cluttered.

We are using v4 for all CodeQL-related Actions.

Dominant language
TypeScript
Stars
1.6k
Forks
493
Avg merge
1d 13h
Merged PRs (30d)
44

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/codeql-action

All issues in github/codeql-action

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.