sitaramc / gitpod

local caching server for git when the actual server is on the other side of a (possibly slow) WAN link
94 stars 14 forks source link

Doesn't work with Git 2.18.0 #4

Open ezyang opened 6 years ago

ezyang commented 6 years ago

strace seems to suggest that this version of Git no longer tries to invoke git-upload-pack:

[pid  8008] execve("/usr/bin/git", ["/usr/bin/git", "upload-pack", "--strict", "--timeout=0", "."], [/* 21 vars */]) = 0
[pid  8008] arch_prctl(ARCH_SET_FS, 0x7f31305d4700) = 0
[pid  8008] clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f31305d49d0) = 8059
strace: Process 8059 attached
[pid  8059] execve("/usr/bin/git", ["/usr/bin/git", "--shallow-file", "", "pack-objects", "--revs", "--thin", "--stdout", "--shallow", "--progress", "--delta-base-offset"], [/* 21 vars */]) = 0
sitaramc commented 5 years ago

Hi

I have been unable to get this to work, so I was forced to replace the whole thing with a different script that does almost the same thing, but uses git-daemon's "--access-hook" option. (I am also somewhat ashamed to note that that option had always existed, but I did not know it!)

This script currently has some hardcodings. Please take a look at the comments in the code for details, and let me know what you would like to add as customisation and I will add it.

There is also no support for ssh mode now; if authenticated access to cached repos is needed, it's best done using gitolite, and enable the "upstreamm" trigger.

regards sitaram