1

I reviewed the documentation at the web site and searched their forums but the following are still unclear so I just need a bit more info. With jGit can I:

  • Create new repositories
  • add users / rsa keys to a repository

Or is jGit purely for client side operations?

Gregg
  • 34,973
  • 19
  • 109
  • 214
  • What do you mean by "add users / rsa keys to a repository"? – fge Dec 19 '11 at 22:15
  • I'm not sure how to better explain that. I need to assign users to repositories and in doing so I have add their rsa public key so that git can track who is doing what. – Gregg Dec 19 '11 at 22:17
  • Even native git cannot do that, what you want is gitolite -- but it works with native git. It would work with jgit if it supported the necessary hooks, which I don't know... – fge Dec 19 '11 at 22:21
  • I know git client doesn't do that. That's why I asked if jGit supported it. If that means via hooks into gitolite or gitosis, fine. I just wanted to know. – Gregg Dec 19 '11 at 22:25

1 Answers1

1

JGit supports the creation of new repositories: See Running the JGit CLI , one of the commands being:

init     Create an empty git repository

However, when it comes to "assign users to a repo", this is no longer a git issue, but an authorization system issue.
You need to add an extra layer to your Git setup (whether it is used with JGit or any other Git library) in order to manage the authorization.
I would recommend gitolite.

(and that doesn't include the authentication issue, which isn't covered by JGit or gitolite: see all the issues you might have to cover).

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250