Reputation: 21
I have to download files from Git hub and store them in local file system using java. Can somebody tell me if there is any api to do that?
Upvotes: 0
Views: 2262
Reputation: 61
Check out JGit: https://www.eclipse.org/jgit/. The code should be something like:
Git.cloneRepository()
.setURI("https://github.com/...")
.setDirectory(Paths.get("/path/to/local/").toFile())
.call();
Upvotes: 1