Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-55948

Git client 3.0.0-rc called from git parameter plugin fails, 2.x worked

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: git-client-plugin
    • Labels:
      None
    • Environment:
      Latest Jenkins 2.150.2
      All plugins updated
    • Similar Issues:

      Description

      I have several jobs in which I can choose branches from a "multiple-scm" (i.e. several Git repos that are needed to compile a project).

       

      The first time the job is configured, it shows all the branches (one git-parameter for each Git repo), and it build ok.

      The problem arises when a job has been already built. For the non-first attempt, I always end up with the following crash:

       

      Stack trace

      hudson.plugins.git.GitException: Command "git ls-remote -h http://<omitted by me>.git" returned status code 128: stdout: stderr: /tmp/jenkins-gitclient-pass2775860834031002260.sh: line 3: cat: command not found error: unable to read askpass response from '/tmp/jenkins-gitclient-pass2775860834031002260.sh' fatal: could not read Username for 'http://<omitted by me>': No such device or address at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2318) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1905) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1805) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1796) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getRemoteReferences(CliGitAPIImpl.java:3170) at net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition.getBranch(GitParameterDefinition.java:392) at net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition.generateContents(GitParameterDefinition.java:315) at net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition$DescriptorImpl.doFillValueItems(GitParameterDefinition.java:633) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145) at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:537) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:739) Caused: javax.servlet.ServletException at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:789) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:870) at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:282) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:739) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:870) at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:282) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:739) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:870) at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:282) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:739) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:870) at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:282) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:739) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:870) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:668) at org.kohsuke.stapler.Stapler.service(Stapler.java:238) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1655) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:59) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:128) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:99) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1340) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1242) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:503) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683) at java.lang.Thread.run(Thread.java:748)

       

      Of course, it's not a problem with my credentials, as it works the first time. Moreover, it worked fine a few days ago (before some plugins updated, and Jenkins itself). I don't know what plugin is the culprit, but for sure it is a recent update.

        Attachments

          Activity

          Hide
          ppsgla Malcolm Hannah added a comment -

          Mark Waite thank you very much for looking into this and for finding a work-around so quickly.  (I should've come here sooner - I've been struggling with this on and off for weeks!)

           

          Downgrading git-client to 2.7.5 and git plugin to 3.9.3 appears to have fixed it for me.

           

          I say 'appears to' as my investigations earlier today (before the downgrades) led to some projects being 'fixed' as I stripped them down to a bare minimum example, then experimented with selecting the wrong credentials, then selecting the right credentials etc.  However, I didn't manage to isolate any single particular action that fixed them.

           

          For the record, the answers to your earlier questions are:

          Freestyle project, https repo, master is war on non-virtual non-containerised Ubuntu, nothing relevant in the system log.

           

          Show
          ppsgla Malcolm Hannah added a comment - Mark Waite thank you very much for looking into this and for finding a work-around so quickly.  (I should've come here sooner - I've been struggling with this on and off for weeks!)   Downgrading git-client to 2.7.5 and git plugin to 3.9.3 appears to have fixed it for me.   I say 'appears to' as my investigations earlier today (before the downgrades) led to some projects being 'fixed' as I stripped them down to a bare minimum example, then experimented with selecting the wrong credentials, then selecting the right credentials etc.  However, I didn't manage to isolate any single particular action that fixed them.   For the record, the answers to your earlier questions are: Freestyle project, https repo, master is war on non-virtual non-containerised Ubuntu, nothing relevant in the system log.  
          Hide
          carlosgarcia Carlos Garcia added a comment -

          This problem happened again, and it is not resolved by simply restarting Jenkins server.

          I tried the downgrade and it seems to work for now, fortunately. The problem appears only in jobs with Git Parameters (where I can choose a branch/tag). In this case, an error is thrown and no branches are shown.

           

          Is there any progress on this? It is a strange issue, since my 'cat' command is available:

          1. whereis cat
            cat: /usr/bin/cat /usr/share/man/man1/cat.1.gz

           

          1. cat --version
            cat (GNU coreutils) 8.22
            Copyright (C) 2013 Free Software Foundation, Inc.
            License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
            This is free software: you are free to change and redistribute it.
            There is NO WARRANTY, to the extent permitted by law.

          Written by Torbjörn Granlund and Richard M. Stallman.

           

          Thanks in advance!

          Show
          carlosgarcia Carlos Garcia added a comment - This problem happened again, and it is not resolved by simply restarting Jenkins server. I tried the downgrade and it seems to work for now, fortunately. The problem appears only in jobs with Git Parameters (where I can choose a branch/tag). In this case, an error is thrown and no branches are shown.   Is there any progress on this? It is a strange issue, since my 'cat' command is available: whereis cat cat: /usr/bin/cat /usr/share/man/man1/cat.1.gz   cat --version cat (GNU coreutils) 8.22 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later < http://gnu.org/licenses/gpl.html >. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Torbjörn Granlund and Richard M. Stallman.   Thanks in advance!
          Hide
          markewaite Mark Waite added a comment -

          Carlos Garcia The best "work around" is to not use git client plugin 3.0.0-rc and to not use git plugin 4.0.0-rc. No solution is available yet for those pre-release versions. I've flagged this bug as a blocking bug that must be fixed before the release of git client plugin 3.0.0 and git plugin 4.0.0.

          Show
          markewaite Mark Waite added a comment - Carlos Garcia The best "work around" is to not use git client plugin 3.0.0-rc and to not use git plugin 4.0.0-rc. No solution is available yet for those pre-release versions. I've flagged this bug as a blocking bug that must be fixed before the release of git client plugin 3.0.0 and git plugin 4.0.0.
          Hide
          josebarragan Jose Barragan added a comment - - edited

          Same problem here. 

          org.jenkins-ci.plugins:git:3.12.0
          org.jenkins-ci.plugins:git-client:2.8.2
          git version 2.16.5

          hudson.plugins.git.GitException: Command "git fetch --tags --progress origin +refs/heads/develop:refs/remotes/origin/develop --prune" returned status code 128:
           stdout: 
           stderr: fatal: cannot exec '/var/jenkins_home/caches/git-65d92e97f92a73450ba94ed072b567ff@tmp/pass3737312687055551151.sh': Permission denied
           fatal: could not read Username for 'https://gitlab.internal.into' : terminal prompts disabled

           

          Any solution ahead!?

          Show
          josebarragan Jose Barragan added a comment - - edited Same problem here.  org.jenkins-ci.plugins:git:3.12.0 org.jenkins-ci.plugins:git-client:2.8.2 git version 2.16.5 hudson.plugins.git.GitException: Command "git fetch --tags --progress origin +refs/heads/develop:refs/remotes/origin/develop --prune" returned status code 128: stdout: stderr: fatal: cannot exec '/ var /jenkins_home/caches/git-65d92e97f92a73450ba94ed072b567ff@tmp/pass3737312687055551151.sh' : Permission denied fatal: could not read Username for 'https: //gitlab.internal.into' : terminal prompts disabled   Any solution ahead!?
          Hide
          josebarragan Jose Barragan added a comment -

          I downgrade Git Plugin a Git-Client Plugin and get the same problem

          org.jenkins-ci.plugins:git:3.9.3
          org.jenkins-ci.plugins:git-client:2.7.6
          git version 2.16.5
          Jenkins Version 2.190

          Show
          josebarragan Jose Barragan added a comment - I downgrade Git Plugin a Git-Client Plugin and get the same problem org.jenkins-ci.plugins:git:3.9.3 org.jenkins-ci.plugins:git-client:2.7.6 git version 2.16.5 Jenkins Version 2.190

            People

            • Assignee:
              Unassigned
              Reporter:
              carlosgarcia Carlos Garcia
            • Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated: