jenkinsci / jenkinsci/git-plugin

[JENKINS-68555] LFS not initialized prior to checkout, at least in multibranch pipeline

Open
#3,726 5 comments 0 reactions 0 assignees View on GitHub
component:git-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
694
Forks
1.1k
Avg merge
1h 29m
Merged PRs (30d)
3

Description

I have a multibranch pipeline project that uses LFS.

LFS pull is enabled in the project configuration, and LFS objects are fetched from the server, however "git lfs install" is never called in the workspace, so LFS pointers are never replaced by the actual files.

Searching for this problem suggests that this is a known problem that people know to work around with a pre SCM step, but in a declarative multibranch pipeline, there is no way to configure this.

I can work around the issue myself with additional build steps

```
sh 'git lfs install'
sh 'git lfs checkout

```

but obviously that is not a proper solution.

---
Originally reported by simonrichter, imported from: LFS not initialized prior to checkout, at least in multibranch pipeline


  • status: Open
  • priority: Minor
  • component(s): git-plugin
  • label(s): git-lfs, multi-branch
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 2025-12-02

Raw content of original issue

I have a multibranch pipeline project that uses LFS.

LFS pull is enabled in the project configuration, and LFS objects are fetched from the server, however "git lfs install" is never called in the workspace, so LFS pointers are never replaced by the actual files.

Searching for this problem suggests that this is a known problem that people know to work around with a pre SCM step, but in a declarative multibranch pipeline, there is no way to configure this.

I can work around the issue myself with additional build steps


sh 'git lfs install'

sh 'git lfs checkout

but obviously that is not a proper solution.

environment

```
Jenkins 2.347

Git plugin 4.11.2
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.