Support for server side smart HTTP #90

Open
atp0303 opened this Issue Nov 27, 2011 · 23 comments

Projects

None yet

8 participants

@atp0303

Hi,

I plan to use libgit2sharp in the backend to serve bare git repositories. The idea is to allow clients to do clone requests from the server using smart http. Is this supported with this library? If so what would the code look like?

@nulltoken
libgit2 member

Hello,

Smart Http is indeed supported by libgit2. However, network related features are not available yet through libgit2sharp.
This is one of the next big functionality which will have to be worked on. Please note that client features (clone/pull/pushe, ...) will be implemented sooner than server ones (git deamon like).

Issue #65 specifically deals with client side features. I've slightly renamed the title of this issue to "stress" the server side aspect of your request.

@atp0303
Please note that client features (clone/pull/pushe, ...) will be implemented sooner than server ones (git deamon like)

Any time frame when this will be ready? I wouldn't mind getting involved by testing this component...

@nulltoken
libgit2 member

Any time frame when this will be ready?

This thread describes what has to be done to deal with client features. As you can see the checkout is not available yet and no target milestone date has been defined.

I wouldn't mind getting involved by testing this component...

🆒 Thanks a lot! I'll ping you as you as something can be tested.

@ManuelRauber

Any update on this one?

@nulltoken
libgit2 member

@carlosmn Weren't you working on a ligbit2 based git server?

@ManuelRauber

Does it support receive and update pack so I can build my own little server? Just want to do a IIS WebApp for pushing and pulling.

Can I do this with libgit2sharp yet?

(I'm currently trying to do this with NGit, but I don't like this lib. It does not feel native)

@carlosmn
libgit2 member

@nulltoken Not quite. There's (or wil be soon) a project at work to create a daemon that speaks the server part of the git protocol, but it's not going to serve git repositories as such. If we figure out a way to export the packet protocol stream that makes sense, then I think all of the pieces would be there, but I'm not sure how tightly integrated the server part should be in the library. If git-daemon and git-http-backend aren't enough, then you'll want to do your own customisations in whatever language you use, which means we can't put it all in the library anyway.

@ManuelRauber

Sorry, I need to ask again (I'm not sure, if the things @carlosmn mentioned in the post before, is too much for me):

I just copied this from my post above:

Does it support receive and update pack so I can build my own little server? Just want to do a IIS WebApp for pushing and pulling (and maybe cloning, but this will work, regarding to another issue in this tracker).

Can I do this with libgit2sharp yet?

(I'm currently trying to do this with NGit)

@nulltoken
libgit2 member

Does it support receive and update pack so I can build my own little server? Just want to do a IIS WebApp for pushing and pulling (and maybe cloning, but this will work, regarding to another issue in this tracker).

Although, "most" of the required sub-components and features are there, this is not supported yet.
This will eventually be, but most certainly not by the LibGit2Sharp library itself, but as a separate project taking a dependence on LibGit2Sharp.

@ManuelRauber

Any update on this?

Since you wrote that the sub-components are there, is there the possibility to use libgit2sharp to serve bare repos?

@nulltoken
libgit2 member

Any update on this?

Not yet.

Since you wrote that the sub-components are there, is there the possibility to use libgit2sharp to serve bare repos?

I think so. Libgit2 already exposes a packbuilder. However, you'll have to implement the server-side protocol by yourself.

Below some quick (googled) pointers to some resources you may found interesting:

@jakubgarfield jakubgarfield referenced this issue in jakubgarfield/Bonobo-Git-Server Apr 3, 2013
Closed

How can make a fast repo browser #34

@Aimeast

Any news on this topic?
Looks like libgit2 has already implemented server side smart HTTP transport?
https://github.com/libgit2/libgit2/tree/master/src/transports

@ethomson
libgit2 member

@Aimeast There has been no progress here, the link you point to is for client side smart protocols. Always happy to see a pull request if this is something you're interested in!

@Aimeast

@ethomson This is a very important function. I didn't know what details difference between client side and server side of smart HTTP transport.
I have learning source code of GitSharp, it looks like many logic are similar.
Can you point out details differences between client side and server side?

@Aimeast

nulltoken commented 5 months ago
I think so. Libgit2 already exposes a packbuilder. However, you'll have to implement the server-side protocol by yourself.

@nulltoken Do you know how to implement the server-side protocol by libgit2sharp?

@nulltoken
libgit2 member

It looks like @careri is working on something related. See #508

@careri

Sorry to say that the server side is utilizing git.exe for the Http Smart Protocol, sorry if I got your hopes up.

@Aimeast

😞

@Aimeast

Does anyone handle this? Still no progress? What's situation about this issue? What's API still not done in libgit2?

I just hope I can see the light.

/cc @nulltoken @carlosmn

@carlosmn
libgit2 member

I've started writing server bits, but ti's going to take quite some time until something materialises that would be ready for being exposed.

@c4milo

@carlosmn any update on this? I would be happy to contribute if needed.

@carlosmn
libgit2 member

I started a sketch for the server-defining API/structure in cmn/server but that's probably not much help until we have the underlying tooling. What's still needed is parsing of the protocol for messages which a server will receive, the logic for determining which common objects to acknowledge (we can leave the extensions for later) and the logic for which update commands to accept or refuse.

We'd also likely need a large performance boost to the way we determine how to create packfiles if it's going to make any sense to use libgit2 rather than just fork a git server, which is rather self-sufficient and optimised.

Creating the server is no small task. I'd go about it in the order in which I listed it above, as that would be adding to a framework we already have before starting to work on new modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment