Hi there
We use Jenkins Pipelines, until today WITHOUT Git LFS. Now we want to use Git LFS with the existing repository. Unfortunately, Jenkins is causing problems.
If I create a new project and check out the Git repository (with Git LFS), then it seems to work.
If I check out the Git repository in the existing pipeline, it does not work, although the configurations are the same.
“Git LFS pull after checkout” (Manage → Configuration) ist activated.
“[$class: ‘GitLFSPull’]” is added in Jenkinsfile.
The following error I get:
10:49:21 hudson.plugins.git.GitException: Command "git.exe lfs pull origin" returned status code 2:
10:49:21 stdout:
10:49:21 stderr: batch response: Post "https://[THIS_PART_HIDDEN]firmware/info/lfs/objects/batch": Bad Gateway
10:49:21 Failed to fetch some objects from 'https://[THIS_PART_HIDDEN]firmware.git/info/lfs'
10:49:21
10:49:21 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2842)
10:49:21 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2185)
10:49:21 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:3186)
10:49:21 Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from vlab-fw-07.[THIS_PART_HIDDEN].com/172.18.177.112:63914
10:49:21 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1784)
10:49:21 at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
10:49:21 at hudson.remoting.Channel.call(Channel.java:1000)
10:49:21 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:153)
10:49:21 at jdk.internal.reflect.GeneratedMethodAccessor892.invoke(Unknown Source)
10:49:21 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
10:49:21 at java.base/java.lang.reflect.Method.invoke(Method.java:568)
10:49:21 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:138)
10:49:21 at jdk.proxy100/jdk.proxy100.$Proxy194.execute(Unknown Source)
10:49:21 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1355)
10:49:21 at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
10:49:21 at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:97)
10:49:21 at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:84)
10:49:21 at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
10:49:21 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
10:49:21 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
10:49:21 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
10:49:21 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
10:49:21 Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: bb22099f-c8e3-478e-bdda-0b666dcc41aa
10:49:21 Caused: hudson.plugins.git.GitException: Could not checkout 03e6a1f97a2bdaf038e769e59848108528f3225f
10:49:21 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:3198)
10:49:21 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:170)
10:49:21 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:161)
10:49:21 at hudson.remoting.UserRequest.perform(UserRequest.java:211)
10:49:21 at hudson.remoting.UserRequest.perform(UserRequest.java:54)
10:49:21 at hudson.remoting.Request$2.run(Request.java:377)
10:49:21 at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
10:49:21 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
10:49:21 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
10:49:21 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
10:49:21 at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:125)
10:49:21 at java.base/java.lang.Thread.run(Thread.java:833)
10:49:21 Finished: FAILURE
By the way:
What also confuses me a bit is that an https request is made, although it is actually via SSH. Further up in the output log (not visible here) it also seems to be OK, i.e. the authentication is successful.
Does anyone have a hint as to why Git LFS is not working?
thanks!
MMAGPASB:
What also confuses me a bit is that an https request is made, although it is actually via SSH
As far as I understand git lfs, it downloads the large files with HTTPS, even if the repository URL is an SSH URL. The
server discovery page
of the Git LFS documentation provides examples of how it transforms SSH repository URLs into the HTTPS URL of the Git LFS server:
Git Remote:
[email protected]:foo/bar.git
LFS Server:
https://git-server.com/foo/bar.git/info/lfs
Git Remote:
ssh://git-server.com/foo/bar.git
LFS Server:
https://git-server.com/foo/bar.git/info/lfs
You should see the same failure to your local desktop when you perform git lfs commands from your desktop.