4

The protocol between local repository and remote repository is HTTPS instead of ssh,does it still need lib of jsch,and if it's true, can you tell me how to handle in details,thanks so much~~

sophia2046234
  • 49
  • 2
  • 2
  • 4

2 Answers2

4

Even if it isn't used for https access, jsch is still required for JGit.
See JGit dependencies.

That thread states the same thing, even when cloning an https repo.

This blog post deals with a missing jsch library like so:

There are 2 ways to solve this problem, depending on your setup.

1.) If you're using ant installed on your machine, example on c:\apache-ant. Just place the jsch.jar in it's lib folder.

2.) In case you are using eclipse's ant plugin.

  • Open eclipse
  • Click Window->Preference
  • In type filter textbox type "ant"
  • Click Runtime
  • Expand "Global Entries"
  • Add external jar, and locate jsch.jar in your system
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • ok,thanks so much, it does work~~and can you recommend me some samples that taking use of org.eclipse.jgit.jar to do Java application ,especially pushing to Github – sophia2046234 Jul 11 '13 at 07:47
  • @sophia2046234 sure: I would recommend looking at the JGit API tests: https://github.com/eclipse/jgit/tree/master/org.eclipse.jgit.test/tst/org/eclipse/jgit/api, like the [`PushCommandTest.java`](https://github.com/eclipse/jgit/blob/master/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java) – VonC Jul 11 '13 at 07:55
0

Try to update the project if it is a maven project.

lioune Sr
  • 9
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 20 '22 at 17:15