-
Notifications
You must be signed in to change notification settings - Fork 537
add multi-ack client support (clone broken on VisualStudio Team Services, repo returns 500 error) #335
Comments
@chrisdostert Does it fail with public repositories too? |
@smola I'm unable to find "official" docs stating as much but search results (& failing to make one) seem to suggest it doesn't offer public repo support, only private. |
@chrisdostert Thanks. I'll get an account and test it. |
@chrisdostert Got it. VSTS does not support clients without multi_ack capability (see protocol spec). The server HTTP response contains the following body: Lack of multi_ack support has been a long standing issue in go-git. However, VSTS is the first server we found not supporting clients without multi_ack. Note that the git protocol does not have any standarized way of signaling an error for this case, since capability negotiation assumes that lack of capabilities by the client is always valid. |
If anyone wants to help, here's (most of) the relevant code: https://github.com/src-d/go-git/blob/master/plumbing/protocol/packp/srvresp.go#L22 go-git/plumbing/transport/common.go Line 131 in 932ced9
|
@smola thanks for finding that. Very helpful. opctl has users on VSTS eagerly awaiting this functionality so I feel obligated, but I feel like it's going to take me alot of research to know enough to knock this out. I've been reading through the git-internals docs & go-git codebase trying to get an idea of what it would take; any help/guidance is greatly appreciated. |
@chrisdostert I'm still not sure abouyt how to implement it. Right now Here's how multi_ack works: I'm sorry I cannot provide much more detail without actually diving into the task. In any case, this is something I'll be able to work on soon. |
Given that this is a pretty big change, I propose splitting it in at least 3 PR to make it easier to review (and parallelize the work). This is a summary of what I plan to do: 1. Encoding/DecodingAdd support in 2. Adding dumb support for multi_ack/multi_ack_detailedMake our transports support multi_ack/multi_ack_detailed encoding. This might be separated in 2 PR, one for At this point, this issue would be fixed, since we would formally support multi_ack/multi_ack_detailed at protocol level, and so it would work with VSTS. 3. Create an object iterator to walk havesIn order to implement multi_ack logic, we would need an iterator implementing the same walking logic as 4. Implement multi_ack/multi_ack_detailed logicGiven everything else is done, we can implement the multi_ack/multi_ack_detailed logic, which probably requires changes in the API of |
Removed go-git usage due to regression/incompatibly with azure git repositories see: src-d/go-git#335
Removed go-git usage due to regression/incompatibly with azure git repositories see: src-d/go-git#335
Scenario:
I pass a visual studio team services (VSTS) repo url ('https://tenant.visualstudio.com/project/_git/repo' for example) to PlainClone w/ basic http auth credentials
Expected:
The repo is cloned successfully
Actual:
I get back an
unexpected client error: unexpected requesting "https://tenant.visualstudio.com/project/_git/repo/git-upload-pack" status code: 500
errorThe text was updated successfully, but these errors were encountered: