I tried setting up a job as follows in my .gitlab-ci.yml
file:
precommit:
image: python:3.10.2-slim-bullseye
before_script:
- pip install -r requirements.txt
script:
- pre-commit run --all-files
But the following error is output :
$ pre-commit run --all-files
An error has occurred: FatalError: git failed. Is it installed, and are you in a Git repository directory?
I checked that there was a .git
where the command was being used from - and there is - so I'm not sure why this particular error is being flagged, or how to fix it.