I am trying to add a git repository in a freestyle job. However after adding the repository, seeing the error described in the snip provided.
Asked
Active
Viewed 3,006 times
2

Piyush Nikhade
- 53
- 1
- 4
3 Answers
2
In Jenkins, go to Manage Jenkins > Global Tool Configuration > Git. There, determine the path to git.exe
from just that to something like C:\Program Files\Git\bin\git.exe
—or wherever you have your git.exe
file.

Jeremy Caney
- 7,102
- 69
- 48
- 77

Arttu
- 21
- 2
0
I too had the same error. Please use Java Version 11 instead of Java Version 8. Also, install only the suggested plugins for Git.

Jeremy Caney
- 7,102
- 69
- 48
- 77

Krishna
- 1
-
What are the suggested plugins for git? – Jeremy Caney Aug 07 '22 at 18:31
0
You better check out your Manage Jenkins -> Global Tool Configuration. There you need to look at your JAVA_HOME
value and the Path to Git executable. I'm using the Docker image with these values:
- JAVA_HOME: /opt/java/openjdk
- Path to Git executable: git

B612
- 1
- 2