Non-lightweight git checkout of Jenkinsfile fails if node parameter is provided

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Non-lightweight git checkout of Jenkinsfile fails if node parameter is provided

Martin Schmude
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 +refs/heads/*:refs/remotes/origin/*" returned status code 128:
...
fatal: could not read Username for 'https://gitlab.XXX.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.

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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/7921577c-48e7-4a5a-a3e2-d20497bc6840n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Non-lightweight git checkout of Jenkinsfile fails if node parameter is provided

touseef yousuf
not sure if it helps

There is a known issue with the integration of Jenkins and Bitbucket v7 that if the PR is not having any changes to the Jenkinsfile, the Jenkins will fall back to heavyweight checkout.


On Wednesday, 24 February 2021 at 21:55:10 UTC+5:30 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 +refs/heads/*:refs/remotes/origin/*" returned status code 128:
...
fatal: could not read Username for 'https://gitlab.XXX.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.

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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/00f008cb-097c-40f1-9970-4adef67125b7n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Non-lightweight git checkout of Jenkinsfile fails if node parameter is provided

Martin Schmude
In reply to this post by Martin Schmude
Anybody able to answer my question?

Martin Schmude schrieb am Mittwoch, 24. Februar 2021 um 17:25:10 UTC+1:
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 +refs/heads/*:refs/remotes/origin/*" returned status code 128:
...
fatal: could not read Username for 'https://gitlab.XXX.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.

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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d214d81e-bb30-44d2-8fc2-58bf6852a5bdn%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Non-lightweight git checkout of Jenkinsfile fails if node parameter is provided

Mark Waite-2
In reply to this post by Martin Schmude


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 +refs/heads/*:refs/remotes/origin/*" returned status code 128:
...
fatal: could not read Username for 'https://gitlab.XXX.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 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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/95179e76-96d4-4146-b747-6d0587633484n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Non-lightweight git checkout of Jenkinsfile fails if node parameter is provided

Martin Schmude
The agent is a docker container. Its image is derived
FROM azul/zulu-openjdk:8u252

When inside the container
> uname -a
Linux 3a8cb7c9d3db 3.10.0-1160.6.1.el7.x86_64 #1 SMP Wed Oct 21 13:44:38 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux

> cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS"

Our Dockerfile installs git with 
RUN apt-get -y install git

When inside the container git tells my its version 2.17.1.
> git version
git version 2.17.1
git 2.17.1 is of May 2018, which seems to sooo overaged, in particular to 1.7 mentioned before.


Mark Waite schrieb am Dienstag, 16. März 2021 um 19:52:55 UTC+1:
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 +refs/heads/*:refs/remotes/origin/*" returned status code 128:
...
fatal: could not read Username for 'https://gitlab.XXX.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 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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/92d31317-ce27-4e69-89f1-f6ee6fc67377n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Non-lightweight git checkout of Jenkinsfile fails if node parameter is provided

Martin Schmude
In reply to this post by Mark Waite-2
Our Jenkins connects to Linux nodes by SSH with RHEL 7. The git version is 1.8.3.1.
So the hint about an overaged git version is presumably right. Thank you, Mark!
The node systems are managed by the companies IT infrastructure team and only partially under my control.
So the JGit way looks promising and we will give it a try.



Mark Waite schrieb am Dienstag, 16. März 2021 um 19:52:55 UTC+1:
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 +refs/heads/*:refs/remotes/origin/*" returned status code 128:
...
fatal: could not read Username for 'https://gitlab.XXX.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 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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/34eb42ac-e942-44cd-b22c-68527410170fn%40googlegroups.com.