Note that there are some explanatory texts on larger screens.

plurals
  1. POStarting git-daemon on OS X using launchd
    text
    copied!<p>I am trying to set up an internal git server using my OS X desktop (mostly as a test case). Everything works when SSH keys are involved, but I am currently trying to use git-daemon for read-only cloning. If I start up git-daemon in a terminal:</p> <pre><code>sudo -u git git-daemon --basepath=/Users/git/repos/ --export-all </code></pre> <p>then everything works fine, e.g.</p> <pre><code>git clone git://localhost/My_Project.git </code></pre> <p>But when I try to set this up using launchd, it refuses all requests. I am using this plist file:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt; &lt;plist version="1.0"&gt; &lt;dict&gt; &lt;key&gt;Label&lt;/key&gt; &lt;string&gt;git&lt;/string&gt; &lt;key&gt;UserName&lt;/key&gt; &lt;string&gt;git&lt;/string&gt; &lt;key&gt;OnDemand&lt;/key&gt; &lt;false/&gt; &lt;key&gt;ProgramArguments&lt;/key&gt; &lt;array&gt; &lt;string&gt;/path/to/git-daemon&lt;/string&gt; &lt;string&gt;--base-path=/Users/git/repos/&lt;/string&gt; &lt;string&gt;--export-all&lt;/string&gt; &lt;/array&gt; &lt;/dict&gt; &lt;/plist&gt; </code></pre> <p>And receive the following error if I attempt to clone My_Project:</p> <pre><code>Cloning into My_Project... fatal: The remote end hung up unexpectedly </code></pre> <p>The frustrating thing is that I believe this used to work, so the problem may have less to do with my plist file or use of launchd, and more to do any network settings that may have changed. Any advice would be greatly appreciated.</p> <p>Apologies if this is more of a sysadmin question, but I figured that developers might have some experience here.</p> <p>Update: The Console reports the following error if the repo exists:</p> <pre><code>git[431] error: cannot run upload-pack: No such file or directory </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload