Windows slave machine cannot find git command

Jenkins setup:
Hello experts,
My Jenkins environment are following:
Controller: Ubuntu
agent: Windows10
I can build job as pipeline which print “hello” to console.
Then, I’d like to clone repositry from git.
But, console log said git command is not found.

Caused by: Cannot run program “/usr/bin/git” (in directory “Q:\CICD\jenkins_work\workspace\debug_windows_controller”): CreateProcess error=2, cannot find file

I set Git path as below:

Also, I set to agent as bellow:

(hebereke7 is my node name for windows)

What should I execute git.exe ? Could you tell me please ?

I would configure git without explicit path like this

and then ensure that git is in the path on all machines and the controller.

1 Like

Thank you for your reply.
I tried it and worked well

My Jenkins environment has CentOS agent machine.
The job which built at CentOS agent machine also worked well after changed.

Thanks again :blush: