-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

Apache common の HttpClient ライブラリを使用して、資格情報/Cookie/認証をより適切に制御して、アクセスできるようにすることができます。それが問題だと思いますよね?

于 2013-08-15T01:19:54.947 に答える