Jenkins git remote slave problem

Today I came up with an issue with Jenkins Continuous Integration (v.1.412) server when I was trying to fetch a git repository on a remote slave server (Red Hat). I found a few similar issues and open bugs, but none of them were directly related to Linux slaves. I got this error message dump:

Started by user jenkins
Building remotely on server01
Checkout:MyProject / /home/jenkins/workspace/MyProject – hudson.remoting.Channel@5352c503:server01
Using strategy: Default
Last Built Revision: Revision ebb0c40a1a321a00d8176e25aa81364efaac702f (origin/master)
Checkout:MyProject / /home/jenkins/workspace/MyProject – hudson.remoting.LocalChannel@59ab12f8
Fetching changes from 1 remote Git repository
Fetching upstream changes from ssh://git.server/var/repos/git/MyProject
ERROR: Problem fetching from origin / origin – could be unavailable. Continuing anyway
ERROR: (Underlying report) : Error performing command: git fetch -t ssh://git.server/var/repos/git/MyProject +refs/heads/*:refs/remotes/origin/*
Command ”git fetch -t ssh://git.server/var/repos/git/MyProject +refs/heads/*:refs/remotes/origin/*” returned status code 128: error: cannot run ssh: No such file or directory
fatal: unable to fork

ERROR: Could not fetch from any repository
FATAL: Could not fetch from any repository
hudson.plugins.git.GitException: Could not fetch from any repository
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1008)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:968)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1956)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:270)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at hudson.remoting.Engine$1$1.run(Engine.java:60)
at java.lang.Thread.run(Thread.java:636)

The issue was resolved by adding correct location of the ssh -command (on my server /usr/bin) to the PATH of slave node’s environment settings (on Jenkins).