jenkinsci / jenkinsci/git-plugin

[JENKINS-54053] Git plugin uses git.exe as default on Windows server, even for Linux agents

Open
#3,353 5 comments 0 reactions 0 assignees View on GitHub
component:git-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
694
Forks
1.1k
Avg merge
1h 29m
Merged PRs (30d)
3

Description

When I run Jenkins from the war file on Windows with the default plugins, it defines the git implementation as "git.exe" instead of "git".

When I add a Linux agent, it incorrectly attempts to use "git.exe" as the git executable on the Linux agent.

It should use "git" as the default git implementation on Linux agents even when connected from a Windows master.

Preferred solution is to use a Linux controller rather than a Windows controller because more Jenkins users run Linux controllers than Windows controllers. If that solution is not viable, then an alternate solution is to define a new git implementation like "git-linux" with the path to the git executable on the Linux agents (typically /usr/bin/git or git).

---
Originally reported by markewaite, imported from: Git plugin uses git.exe as default on Windows server, even for Linux agents


  • status: Open
  • priority: Minor
  • component(s): git-plugin
  • resolution: Unresolved
  • votes: 3
  • watchers: 7
  • imported: 2025-12-02

Raw content of original issue

When I run Jenkins from the war file on Windows with the default plugins, it defines the git implementation as "git.exe" instead of "git".

When I add a Linux agent, it incorrectly attempts to use "git.exe" as the git executable on the Linux agent.

It should use "git" as the default git implementation on Linux agents even when connected from a Windows master.

Preferred solution is to use a Linux controller rather than a Windows controller because more Jenkins users run Linux controllers than Windows controllers. If that solution is not viable, then an alternate solution is to define a new git implementation like "git-linux" with the path to the git executable on the Linux agents (typically /usr/bin/git or git).

environment

```
Jenkins 2.146

Default plugins
```

1 attachment

- [image-2020-08-27-11-35-00-215.png](https://issues.jenkins.io/secure/attachment/52447/image-2020-08-27-11-35-00-215.png)
> ![image-2020-08-27-11-35-00-215.png](https://issues.jenkins.io/secure/attachment/52447/image-2020-08-27-11-35-00-215.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.