New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jenkins pipeline - smudge filter lfs failed #4248
Comments
Hey, Sorry to hear you're having trouble. What kind of SSH key are you using to perform this clone (personal or deploy key)? Does it work if you don't enable sparse checkout? What OS is this on, and what version of Git LFS are you using ( |
@bk2204 OS: Debian |
Can you show us the program you're using for |
@bk2204 I'm using the Git plugin of Jenkins. Below is my code. def checkoutStep(branchname, repo, targetdir = "") { |
Hey, I'm not sure what's going on here, but it seems like you're seeing some sort of authentication problem with GitHub using this key. It's not clear to me what the problem is, though. If you can create a set of reproduction steps as a shell script, it should be possible for us to look at this to see if it's a Git LFS issue, but I don't know anything about Jenkins and can't help debug the problem there. |
@bk2204 I will recreate the steps and get back to you. |
@bk2204 So far this is the thing I have figured out. The authentication to the Github Repo works, but it doesn't work with GITLFS both via SSH and HTTPS method. Checking out git https://github.com/XXXXXXX into /var/jenkins_home/jobs/in-ci-pipeline-dev/workspace@script to read Jenkinsfile
From the stderr output: You can see here that it has already got inside the repo, and when it is trying to pull the file which is of 88 MB using gitlfs, it throws error. Via: HTTPS it throws Bad Credential error And the most strange thing is that, this only happens when I'm using the Jenkinsfile in a pipeline, but when I use it a scripted method, it works completely fine. |
Hey, I don't know why this is happening, but I suppose it's possible that you're setting |
@bk2204 You can close this issue. I have figured out that it was an issue from Jenkins side. Which I have fixed it. |
Sorry to revive a closed thread that's not exactly related to this repo, but @GouravIN can you share what you changed in Jenkins to make things work? |
@jeffreyssmith2nd The GitLFS option was not enabled on the job config. So when it was trying to download the files it was failing. |
I know I am commenting is a closed issue, but it is worth noting for others that this workaround means that the initial checkout will not checkout your LFS files. So that is not exactly a fix. |
Getting the following error during my git lfs after checkout step.
Started by user Gourav Pattnaik
Checking out git git@github.com:XXXXX into /var/jenkins_home/jobs/in-ci-pipeline-dev/workspace@script to read Jenkinsfile
using credential XXXXXX
Errors logged to /var/jenkins_home/jobs/in-ci-pipeline-dev/workspace@script/.git/lfs/logs/20200914T144748.824480105.log
Use
git lfs logs last
to view the log.error: external filter 'git-lfs filter-process' failed
fatal: app-new/config/browscap.ini: smudge filter lfs failed
Caused: hudson.plugins.git.GitException: Could not checkout 438b9cbb48f1c2cceeb54300753bb608dccc24c6
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:2497)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1242)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:125)
at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:155)
at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:69)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:309)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
ERROR: Maximum checkout retry attempts reached, aborting
Finished: FAILURE
The text was updated successfully, but these errors were encountered: