The PATH used by the agent is probably different than the PATH used by your
command line login.

You can report the PATH used by the agent from a freestyle job running on
that agent.  The batch step would be:

    SET PATH

That should show you that the PATH defined for the agent does not include
the git bin, cmd, or usr\bin directories.

Mark Waite

On Wed, Oct 18, 2017 at 11:41 AM itchymuzzle <[email protected]> wrote:

> https://issues.jenkins-ci.org/browse/JENKINS-40192 Seems like this issue,
> but I'm not using Docker.
>
>
> Jenkins master is AWS Linux, agent is AWS Windows Server 2012
>
>
> Git is in my PATH, and when I am in the workspace I am able to run git
> from the command line.
>
>
>
> Cloning the remote Git repository
>
> Cloning repository [email protected]:XXXXXXXX/web-application-library.git
>
>  > git init C:\Jenkins\workspace\Build_Web_App_Library # timeout=10
>
>
>
> ERROR: Error cloning remote repo 'origin'
>
> hudson.plugins.git.GitException: Could not init
> C:\Jenkins\workspace\Build_Web_App_Library
>
>
>
> Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to
> JNLP4-connect connection from
> ec2-54-174-233-xx.compute-1.amazonaws.com/54.174.233.xx:62490
>
>
>
> Caused by: hudson.plugins.git.GitException: Error performing command: git
> init C:\Jenkins\workspace\Build_Web_App_Library
>
>
>
> Caused by: java.io.IOException: Cannot run program "git" (in directory
> "C:\Jenkins\workspace\Build_Web_App_Library"): CreateProcess error=2, The
> system cannot find the file specified
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/94420efe-fb1c-4878-b3a2-d7a6670a3e06%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/94420efe-fb1c-4878-b3a2-d7a6670a3e06%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtGjKz9m9XN%2B5r-vFahPyr7qEt9OhE97E4Vn4HHAA3O76w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to