2

As I requested to validate the user has the repository which he provided. So I need to list out the repositories belongs to the particular User by using their credentials . I'm using Eclipse's Jgit to handle git-hub from Java code. Whether this API provides any pre-built method for this?? Please Guide me through this.

Thanks in advance.

Varun Kumar
  • 1,015
  • 2
  • 9
  • 17

1 Answers1

2

In order to list the repositories that belong to a GitHub user account, you'll want to use the GitHub API. The API is language-independent, all data is sent and received as JSON over HTTP. Java wrapper libraries are listed on the GitHub libraries page

Once you figured the repository that is to be accessed, you can use JGit to clone it.

Rüdiger Herrmann
  • 20,512
  • 11
  • 62
  • 79
  • Will it gives me the repositories also which the user doesn't create but having permission for commit and push Operations?? I need that repositories too?? Can I able to achieve this?? – Varun Kumar May 30 '14 at 11:26
  • Did you read the [GitHub API documentation for repositories](https://developer.github.com/v3/repos/)? It's all there. – Rüdiger Herrmann May 30 '14 at 12:07
  • Yeah.. I read it. But bit confused about how to do this from Java code. – Varun Kumar May 30 '14 at 12:54