On Wednesday, February 24, 2021 at 9:25:10 AM UTC-7 Martin Schmude wrote:
> Hello all, > I am experiencing the following issue. > I have a pipeline job (not multibranch). In the job configuration the > Jenkinsfile is checked out from git. The checkout is not lightweight (there > is a tick "Lightweight checkout", which is not set). > A node job parameter is configured. > When starting the job the git checkout of the Jenkinsfile fails with > > Caused by: hudson.plugins.git.GitException: Command "git fetch --tags > --progress -- https://gitlab.XXX.com/project.git > <https://gitlab.consulting.sltc.com/appmod/qef/playground/kms.git> > +refs/heads/*:refs/remotes/origin/*" returned status code 128: > ... > fatal: could not read Username for 'https://gitlab.XXX.com > <https://gitlab.consulting.sltc.com/>': terminal prompts disabled > > Note that the Jenkinsfile has not started to be executed at that moment, > since Jenkins failed to check it out. > The error does not occur if > > - if the selected node is master, or > - if the "Lightweight checkout" is selected. > > It does also not occur if no node parameter is configured at all. > > Is this expected behaviour or an bug? Should I file a ticket in > https://issues.jenkins.io? I haven't found a ticket there that exactly > matches my issue. > This > https://groups.google.com/g/jenkinsci-users/c/hg4OUmlS9T8/m/Lg8UYopCBAAJ > looks related. But the root cause there was a file permissions issue, > which is surely not the case in my setup. > > You don't mention the operating system on the agent or the version of command line git on the agent. CentOS 6, Oracle Linux 6, Red Hat Enterprise Linux 6, and Scientific Linux 6 all ship a 1.7 version of command line git that is so old that it is not officially supported by the Jenkins git plugin. The plugin has made reasonable attempts to not break things that happily work with that old version of command line git, but no longer applies any effort to test it or to adapt to failures with it. You could enable JGit <https://plugins.jenkins.io/git-client/#enabling-jgit> on your installation and try the same checkout with JGit. If it works with JGit, that may be another indicator that the issue is with the version of command line git on the agent. You could install the most recent version of command line git on the agent (currently 2.31.0) and see if that resolves the issue. Mark Waite > My Jenkins instance is 2.222.4, running in a container derived from the > Jenkins base image jenkins/jenkins:2.222.4. > -- 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/95179e76-96d4-4146-b747-6d0587633484n%40googlegroups.com.