Re: Git commands succeed within a build step but fail when the plugin executes them.

2016-09-20 Thread Steve K
Thanks Mark.
That's interesting, because I did modify the agent's configuration to add 
the Git executable's directory to the %PATH% environment variable.
Prior to that, the Git commands did not work from within a build step 
either.
It would seem that, with Git's bin directory in the PATH, the plugin should 
be able to execute it.
Steve K.

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/94dde7a3-81e2-44c4-9df9-c9643bfbaa56%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Git commands succeed within a build step but fail when the plugin executes them.

2016-09-20 Thread Mark Waite
If you use the Git for Windows installer, it offers 3 choices for how you
can modify your PATH to include git.  If you install in "Program Files"
(rather than a thumbdrive install) and choose to at least be able to run
git from the Windows command prompt (the middle choice), then you shouldn't
need any further configuration globally or locally.

If you choose to not modify the PATH to allow Windows command prompt to run
git, then the git plugin doesn't (currently) attempt to make guesses about
the location of the git executable.

Mark Waite

On Tue, Sep 20, 2016 at 12:19 PM Steve K 
wrote:

>
>
> Thanks Mark.  That does seem to have done the trick.
> I had added the Git location on a Global basis (via. Manage Jenkins -->
> Configure System) but that didn't help.
> I'm a little disappointed that I have to deal with this on a per-agent
> basis (we didn't need to do that when using a v1.625.3 Windows master),
> but, if it works, it works.
>
> Thanks again.
>
> Steve K.
>
> --
> 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 jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/89f29afc-a413-41f9-85f9-027dd544ca14%40googlegroups.com
> 
> .
> 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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtG9iyT5J7ngAapnfzz3%3D15UN90z0ng7eobAuS7Vx7Cs_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Git commands succeed within a build step but fail when the plugin executes them.

2016-09-20 Thread Steve K


Thanks Mark.  That does seem to have done the trick.
I had added the Git location on a Global basis (via. Manage Jenkins --> 
Configure System) but that didn't help.
I'm a little disappointed that I have to deal with this on a per-agent 
basis (we didn't need to do that when using a v1.625.3 Windows master),
but, if it works, it works.

Thanks again.

Steve K.

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/89f29afc-a413-41f9-85f9-027dd544ca14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Git commands succeed within a build step but fail when the plugin executes them.

2016-09-20 Thread Mark Waite
You need to define the location of the git command on your Windows agent.
Usually that is in C:\Program Files\Git\bin\git.exe.

Look in the "Tool Locations" section of the agent configuration page.

Mark Waite

On Tue, Sep 20, 2016 at 11:04 AM Steve K 
wrote:

> Hello,
>
> I'm running Jenkins 2.7.3 from a CentOS master invoking Git commands on a
> Windows 8.1 machine.
>
> git commands, such as the following, succeed when run within a "Windows
> batch command" step.
>
>
> *git clone --verbose --recursive --branch fs02
> ssh://scmbu...@rocgit01.corp.mycompany.com:29418/Crown.git
> *
> But, when the plugin tried to execute the command, I got:
>
> Cloning the remote Git repositoryCloning repository 
> ssh://scmbu...@rocgit01.corp.mycompany.com:29418/Crown.git > git init 
> C:\home\Evo # timeout=10ERROR: Error cloning remote repo 
> 'origin'hudson.plugins.git.GitException 
> :
>  Could not init C:\home\Evoat 
> org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:663)
>  
> 
>at 
> org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:464)
>  
> 
>at 
> org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152)
>  
> 
>at 
> org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145)
>  
> 
>at hudson.remoting.UserRequest.perform(UserRequest.java:153) 
> 
>  at hudson.remoting.UserRequest.perform(UserRequest.java:50) 
> 
>   at hudson.remoting.Request$2.run(Request.java:332) 
> 
>  at 
> hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
>  
> 
> at java.util.concurrent.FutureTask.run(Unknown Source)  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)   at 
> hudson.remoting.Engine$1$1.run(Engine.java:85)   at 
> java.lang.Thread.run(Unknown Source) at ..remote call to 
> nextgencibuild(Native Method)   at 
> hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)  at 
> hudson.remoting.UserResponse.retrieve(UserRequest.java:253)  at 
> hudson.remoting.Channel.call(Channel.java:781)   at 
> org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145)
>at sun.reflect.GeneratedMethodAccessor267.invoke(Unknown Source)   
>  at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498) at 
> org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131)
> at com.sun.proxy.$Proxy53.execute(Unknown Source)   at 
> hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1042)  at 
> hudson.plugins.git.GitSCM.checkout(GitSCM.java:1082) at 
> hudson.scm.SCM.checkout(SCM.java:495)at 
> hudson.model.AbstractProject.checkout(AbstractProject.java:1269) at 
> hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
> at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)  
>   at 
> hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) 
>at hudson.model.Run.execute(Run.java:1741)  at 
> hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)  at 
> hudson.model.ResourceController.execute(ResourceController.java:98)  at 
> hudson.model.Executor.run(Executor.java:410)Caused by: 
> hudson.plugins.git.GitException: Error performing command: git init 
> C:\home\Evo   at 
> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1759)
>at 
> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1725)
>at 
> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1721)
>at 
> 

Git commands succeed within a build step but fail when the plugin executes them.

2016-09-20 Thread Steve K
Hello,

I'm running Jenkins 2.7.3 from a CentOS master invoking Git commands on a 
Windows 8.1 machine.

git commands, such as the following, succeed when run within a "Windows 
batch command" step.


*git clone --verbose --recursive --branch fs02 
ssh://scmbu...@rocgit01.corp.mycompany.com:29418/Crown.git*
But, when the plugin tried to execute the command, I got:

Cloning the remote Git repositoryCloning repository 
ssh://scmbu...@rocgit01.corp.mycompany.com:29418/Crown.git > git init 
C:\home\Evo # timeout=10ERROR: Error cloning remote repo 
'origin'hudson.plugins.git.GitException 
:
 Could not init C:\home\Evo  at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:663) 

   at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:464) 

   at 
org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152)
 

   at 
org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145)
 

   at hudson.remoting.UserRequest.perform(UserRequest.java:153) 

 at hudson.remoting.UserRequest.perform(UserRequest.java:50) 

  at hudson.remoting.Request$2.run(Request.java:332) 

 at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
 

at java.util.concurrent.FutureTask.run(Unknown Source)  at 
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)   at 
hudson.remoting.Engine$1$1.run(Engine.java:85)   at 
java.lang.Thread.run(Unknown Source) at ..remote call to 
nextgencibuild(Native Method)   at 
hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)  at 
hudson.remoting.UserResponse.retrieve(UserRequest.java:253)  at 
hudson.remoting.Channel.call(Channel.java:781)   at 
org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145)
   at sun.reflect.GeneratedMethodAccessor267.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at 
org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131)
at com.sun.proxy.$Proxy53.execute(Unknown Source)   at 
hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1042)  at 
hudson.plugins.git.GitSCM.checkout(GitSCM.java:1082) at 
hudson.scm.SCM.checkout(SCM.java:495)at 
hudson.model.AbstractProject.checkout(AbstractProject.java:1269) at 
hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)   
 at hudson.model.Run.execute(Run.java:1741)  at 
hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)  at 
hudson.model.ResourceController.execute(ResourceController.java:98)  at 
hudson.model.Executor.run(Executor.java:410)Caused by: 
hudson.plugins.git.GitException: Error performing command: git init C:\home\Evo 
  at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1759)
   at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1725)
   at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1721)
   at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1391)
 at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:661) 
 at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:464) 
 at 
org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152)
at 
org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145)
at