-2

I have 3 private GitHub repos, using Java, I would like to login to my account, and download a jar file from the RAW section of the repo. A simple task if the repos were public. But not so when private.

I have thought about using Apache2's HttpClient. However I have no clue (and googling didn't help either) how GitHub's auth is laid out.

I thought there might be some kind of library for GitHub in Java, but the only Lib I can find doesn't allow downloading of files (here). Only logging in to the GitHub auth and pushing commits/fetching repos, etc. Which isn't what I am looking to do.

Any help is greatly appreciated, thanks.

Since I can't create an answer. Using the API here

You can create a download service and download the repo. I've not worked out how yet, but I'm pretty sure it's possible, and I will update this answer once I've done it. I need to grab the "IRepositoryIdProvider"

4

1 回答 1

0

You can use Apache common's HttpClient library to give better control of the credentials/cookies/auth stuff to allow you to get the access. I think that is the problem, right?

于 2013-08-15T01:19:54.947 回答