Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Pull Issue(Pull taking long time to complete)
Pull Issue [message #1809872] Thu, 25 July 2019 08:01 Go to next message
manish  payasi is currently offline manish payasiFriend
Messages: 1
Registered: July 2019
Junior Member
I am using org.eclipse.jgit(vesrion 4.11.0.201803080745-r)in my java application.
If the remote repository is huge then it takes a long time to pull the files in my local repository, around 5-6 minutes.

I already cloned git repository in my local machine. After some times(2-3 hours) I hit pull process it takes a long time to finish the process even though nothing new in the git repo. Once pull is done and again If I hit pull, it works fine.
Clone is also taking time but that is fine because that is huge repo to clone for the first time.

Note: I am using an SSH connection to perform all git operations.

Could you review below code to see pull logic in my application and help me resolve the issue?


FileRepositoryBuilder builder = new FileRepositoryBuilder();
Repository repository =builder.setWorkTree(sourceFolderFile).readEnvironment().build();

Git git = new Git(repository);

git.checkout().setName(branch);

if (config.getGitHubConnectionType().equalsIgnoreCase("ssh")) {
      GitSSHConfigSessionFactory sshSessionFactory = new GitSSHConfigSessionFactory(config.getGitHubPrivateKeyFilePath(),config.getGitHubPassphrase(),String.valueOf(config.getGitStrictHostKeyCheck()));
      SshSessionFactory.setInstance(sshSessionFactory);
     git.pull().setTransportConfigCallback(new TransportConfigCallback() {
            @Override
           public void configure(Transport transport) {
                                        SshTransport sshTransport = (SshTransport) transport;
                                        sshTransport.setSshSessionFactory(sshSessionFactory);
           }
     }).call();
}
Re: Pull Issue [message #1810137 is a reply to message #1809872] Thu, 01 August 2019 08:34 Go to previous message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 174
Registered: August 2016
Senior Member
Maybe if you displayed the PullResult that might give you an idea why it sometimes takes long. Maybe it has to pull a lot.

You also seem to be using your own SSH session factory, maybe something is wrong in there.
Previous Topic:LFS problems
Next Topic:Can't get signing to work
Goto Forum:
  


Current Time: Mon Dec 09 20:25:02 GMT 2019

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

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

Back to the top