Jenkins - Unable to resolve git exception

171 views
Skip to first unread message

senthil murugan

unread,
Feb 26, 2021, 10:42:13 AM2/26/21
to Jenkins Users
Dear guys,

I am getting an error stating that "Error cloning remote repo origin"
Caused by :hudson. git.GitException: Error performing command  c:\.program files\Git\ bin\git.exe init /opt/jenkins-slave

I have already set the git windows path in Global tools correctly.

Jenkins master is windows server and Slave node in Linux.

This is a pipeline job and It tries to run using windows git  path instead of Linux one. Please advise.

Mark Waite

unread,
Feb 26, 2021, 12:12:14 PM2/26/21
to Jenkins Users
On Friday, February 26, 2021 at 8:42:13 AM UTC-7 you  wrote:
Dear guys,

I am getting an error stating that "Error cloning remote repo origin"
Caused by :hudson. git.GitException: Error performing command  c:\.program files\Git\ bin\git.exe init /opt/jenkins-slave

I have already set the git windows path in Global tools correctly.

Jenkins master is windows server and Slave node in Linux.


JENKINS-54053 describes the same problem and offers a workaround to the problem.  Define a git tool in the Jenkins Global Tool Configuration and use 'git' as the tool path.  That will allow Jenkins to use the operating system PATH to find the executable.
Reply all
Reply to author
Forward
0 new messages