I am trying to set up an internal git server using my OS X desktop (mainly as a test case). Everything works when SSH keys are involved, but I'm currently trying to use git -daemon for read-only cloning. If I run git -daemon in a terminal:
sudo -u git git-daemon --basepath=/Users/git/repos/ --export-all
then everything works fine, for example.
git clone git:
But when I try to install this using start, it refuses all requests. I am using this plist file:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>git</string> <key>UserName</key> <string>git</string> <key>OnDemand</key> <false/> <key>ProgramArguments</key> <array> <string>/path/to/git-daemon</string> <string>--base-path=/Users/git/repos/</string> <string>--export-all</string> </array> </dict> </plist>
And get the following error if I try to clone My_Project:
Cloning into My_Project... fatal: The remote end hung up unexpectedly
The failure is that I believe this worked, so the problem may be less related to my plist file or using launchd and more for any network settings that can be changed. Any advice would be greatly appreciated.
Sorry if this is more of a sysadmin question, but I thought that the developers might have some experience here.
Update. The console reports the following error if a repo exists:
git[431] error: cannot run upload-pack: No such file or directory
source share