Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Problem checking out large files with JGIT LFS BuiltinLFS
Problem checking out large files with JGIT LFS BuiltinLFS [message #1841449] Mon, 17 May 2021 09:39
Martin R. is currently offline Martin R.Friend
Messages: 1
Registered: May 2021
Junior Member
Hi, we are using JGIT in an Android App (API Level 29).
So far everything is working fine, but we have trouble to setup LFS.
Trying to register and setup the BuiltinLFS hooks like this:
private void cloneRepo() throws IOException, InvalidRemoteException, TransportException, GitAPIException, InterruptedException, URISyntaxException {
        FileRepositoryBuilder builder = new FileRepositoryBuilder();
        Repository repository = builder.setWorkTree(m_gitDir).setup().build();
        Git git = new Git(repository);
        CloneCommand clone = git.cloneRepository();
        InstallBuiltinLfsCommand installLfs = (InstallBuiltinLfsCommand) BuiltinLFS.getInstance().getInstallCommand();

    private void pullRepo() throws IOException, InvalidRemoteException, TransportException, GitAPIException, URISyntaxException {
        Git git =;
        Repository repo = git.getRepository();
        RemoteSetUrlCommand setUrl = git.remoteSetUrl();
        setUrl.setRemoteUri(new URIish(m_url));;


The repo is set up for LFS according the gitlab guide and it is hosted on gitlab.
However, running cloneRepo() above just checks out using the normal git process. The large files in the repo are not downloaded, no error thrown. Checking out the large files from desktop using the normal git command is working fine.
We also tried to call
but this fails, as
in org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/ returns null.
Any help appreciated how to setup LFS for JGIT. Is there some equivalent API functions to the normal
git lfs fetch

kind regards

PS: Sorry, unable to correctly link the gitlab guide and as users without one post are unable to include links.
Previous Topic:Eclipse EGit TFS Git Connection - Authentication not supported
Next Topic:[Feature request] Remember password for GPG key when signing git commits (linux)
Goto Forum:

Current Time: Sat Oct 01 14:51:43 GMT 2022

Powered by FUDForum. Page generated in 0.02792 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top