Jenkins pipeline-as-code: not a git repository

Command line git resolved a security vulnerability by increasing the strictness they apply to the ownership of files and directories. If git files or directories are owned by a user other than the user running the command line git process, then recent releases of command line git fail with the not in a git directory message.

Check the file and directory ownerships on the controller and on the agents. They must be owned by the user that is running command line git.

The behavior is not something that Jenkins controls. Refer to JENKINS-70540 for more details

1 Like