This is my problem. I have wiped out my workspace and there is no .git/config file to read. This seems like a basic ordering problem. The workspace needs to be cloned before any git operations happen.
On Tue, Jan 7, 2014 at 9:28 AM, Mark Waite <mark.earl.wa...@gmail.com>wrote: > I think that the reason the "git config --get remote.origin.url" command > returns status code 1 is that the value of remote.origin.url is not set in > the .git/config file in the workspace. > > My thought was that if the first build step in your job was a "git config > --set remote.origin.url your_url", then later executions of that job may > find that value of remote.origin.url and not report the exception. That > won't help for the first run of the job after the workspace has been wiped, > since the prune call happens before the first build step. > > > On Tue, Jan 7, 2014 at 6:51 AM, Jon Schewe <jpsch...@mtu.net> wrote: > >> I don't see how using git commands from within the job itself would help >> as there is no local git repository at this point. >> >> > Another possibility might be to attempt to use git commands from within >> the job itself to define remote.origin.url if it is not already defined. >> >> >> >> On Mon, Jan 6, 2014 at 4:16 PM, Mark Waite <mark.earl.wa...@gmail.com>wrote: >> >>> I don't understand your comment that you're "not sure how that would >>> help as the job won't start until the workspace is cloned." >>> >>> The log output reports "pruning obsolete local branches". Until the >>> workspace is cloned, there is no repository, so there is nothing to prune. >>> I assumed that meant the workspace was already fully cloned by the time >>> the job attempted to prune local branches. >>> >>> When you disabled "prune obsolete local branches", did it still report >>> "pruning obsolete local branches" in the output? >>> >>> >>> >>> On Mon, Jan 6, 2014 at 1:55 PM, Jon Schewe <jpsch...@mtu.net> wrote: >>> >>>> Not sure how that would help as the job won't start until the workspace >>>> is cloned. >>>> >>>> >>>> On Sun, Jan 5, 2014 at 9:32 PM, Mark Waite >>>> <mark.earl.wa...@gmail.com>wrote: >>>> >>>>> Another possibility might be to attempt to use git commands from >>>>> within the job itself to define remote.origin.url if it is not already >>>>> defined. >>>>> >>>>> >>>>> On Sun, Jan 5, 2014 at 8:30 PM, Mark Waite >>>>> <mark.earl.wa...@gmail.com>wrote: >>>>> >>>>>> That stack trace looks a lot like >>>>>> https://issues.jenkins-ci.org/browse/JENKINS-20258 . You might >>>>>> consider removing the "prune branches" option from the job configuration >>>>>> to >>>>>> see if that helps avoid the problem. >>>>>> >>>>>> If you're using include region, exclude region, or exclude user, then >>>>>> you'll need to also add the "Force polling using workspace" option. The >>>>>> default is now to use fast remote polling, but that default cannot >>>>>> process >>>>>> include or exclude regions. >>>>>> >>>>>> Mark Waite >>>>>> >>>>>> >>>>>> On Sun, Jan 5, 2014 at 7:12 PM, Jon Schewe <jpsch...@mtu.net> wrote: >>>>>> >>>>>>> Anyone else running into problems with the git plugin version 2.0? >>>>>>> I'm using Jenkins 1.509.4 and have run into the problem that if I wipe >>>>>>> out >>>>>>> my workspace either manually that the plugin can't clone a new >>>>>>> workspace. >>>>>>> It errors like this: >>>>>>> >>>>>>> *16:08:58* Started by user Jon Schewe >>>>>>> <http://mtu.net/jenkins/user/jpschewe>*16:08:58* Building in workspace >>>>>>> /home/hudson/.hudson/jobs/fll-sw-feature-branches/workspace*16:08:58* >>>>>>> Pruning obsolete local branches*16:08:58* FATAL: Command "config --get >>>>>>> remote.origin.url" returned status code 1:*16:08:58* stdout: *16:08:58* >>>>>>> stderr: *16:08:58* hudson.plugins.git.GitException >>>>>>> <http://stacktrace.jenkins-ci.org/search?query=hudson.plugins.git.GitException>: >>>>>>> Command "config --get remote.origin.url" returned status code >>>>>>> 1:*16:08:58* stdout: *16:08:58* stderr: *16:08:58* at >>>>>>> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:981)*16:08:58* >>>>>>> at >>>>>>> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:961)*16:08:58* >>>>>>> at >>>>>>> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:957)*16:08:58* >>>>>>> at >>>>>>> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:877)*16:08:58* >>>>>>> at >>>>>>> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:887)*16:08:58* >>>>>>> at >>>>>>> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getRemoteUrl(CliGitAPIImpl.java:615)*16:08:58* >>>>>>> at >>>>>>> hudson.plugins.git.GitAPI.getRemoteUrl(GitAPI.java:61)*16:08:58* at >>>>>>> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.prune(CliGitAPIImpl.java:405)*16:08:58* >>>>>>> at >>>>>>> hudson.plugins.git.extensions.impl.PruneStaleBranch.beforeCheckout(PruneStaleBranch.java:31)*16:08:58* >>>>>>> at hudson.plugins.git.GitSCM.checkout(GitSCM.java:858)*16:08:58* >>>>>>> at >>>>>>> hudson.model.AbstractProject.checkout(AbstractProject.java:1376)*16:08:58* >>>>>>> at >>>>>>> hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:655)*16:08:58* >>>>>>> at >>>>>>> jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)*16:08:58* >>>>>>> at >>>>>>> hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:560)*16:08:58* >>>>>>> at hudson.model.Run.execute(Run.java:1592)*16:08:58* at >>>>>>> hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)*16:08:58* at >>>>>>> hudson.model.ResourceController.execute(ResourceController.java:88)*16:08:58* >>>>>>> at hudson.model.Executor.run(Executor.java:237) >>>>>>> >>>>>>> >>>>>>> Sometimes clearing the SCM configuration and then setting it again >>>>>>> works, but that isn't working for me right now either. >>>>>>> >>>>>>> >>>>>>> Also switching to the inverse choose strategy doesn't appear to work >>>>>>> like it used to. Instead the master branch was built rather than being >>>>>>> the branch to exclude. >>>>>>> >>>>>>> >>>>>>> I've manually cloned my repository into the workspace directory and >>>>>>> that seems to have gotten me building again, although the inverse build >>>>>>> strategy still isn't working. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> http://mtu.net/~jpschewe >>>>>>> >>>>>>> -- >>>>>>> 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. >>>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>>> >>>>>> >>>>>> >>>>> -- >>>>> 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. >>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>> >>>> >>>> >>>> >>>> -- >>>> http://mtu.net/~jpschewe >>>> >>>> -- >>>> 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. >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>> >>> -- >>> 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. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> >> >> -- >> http://mtu.net/~jpschewe >> >> -- >> 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. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- > 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. > For more options, visit https://groups.google.com/groups/opt_out. > -- http://mtu.net/~jpschewe -- 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. For more options, visit https://groups.google.com/groups/opt_out.