As you can see the command is not properly started, You have to set the path of git.exe properly so that the command should contain complete path of git.exe(inclusive of git.exe)
Your Command is,
C:\Program Files\Git\bin ls-remote -h ssh://git@localhost:7999/sam/bo.git HEAD
You have to set the path of your git.exe(git.exe inclusive) in
Manage Jenkins>Global Tool Configuration>Path to Git executable and set path as "C:\Program Files\Git\bin\git.exe"
Once you set the path it would look like
C:\Program Files\Git\bin\git.exe ls-remote -h ssh://git@localhost:7999/sam/bo.git HEAD
Once this is done, you can check for https link or ssh link and check for credential as answered above.