Take the 2-minute tour ×

I'm sharing my repository on my

Linux nozim-desktop 2.6.32-24-generic #43-Ubuntu SMP Thu Sep 16 14:17:33 UTC 2010 i686 GNU/Linux

and I when I run:


it says:

sudo: git-daemon: command not found

What I'm missing?

share|improve this question

3 Answers 3

up vote 2 down vote accepted

In Ubuntu 12.04, the following line worked for me out of the box (execute it in the Git repository you want to share):

git daemon --export-all --base-path=$(pwd)

To clone the shared repository, use

# e.g., git clone git://my-machine/ test-project

Note that the/ after the hostname is required.

share|improve this answer

Take a look at https://help.ubuntu.com/community/Git#Making_available_public_cloning_of_the_projects

It solved my problem.

share|improve this answer
Thank you, I'll try it asap :) –  Nozim Aug 29 '12 at 12:34

After encountering the same problem on my Ubuntu 10.04 system, I learned that git-daemon was just installed somewhere else and operated differently than the guide I followed on setting it up was expecting it to.

On my system, it was located at /us/lib/git-core/git-daemon

To use it, edit the file /etc/service/git-daemon/run/ and modify the parameters to suit your needs.

Here is mine:

exec 2>&1
echo 'git-daemon starting.'
exec chpst -ugitdaemon /usr/lib/git-core/git-daemon --verbose --base-path=/home/git/repositories

If you want all of your repositories to be available publicly, add --export-all, otherwise, run touch git-daemon-export-ok within the /path/to/repositories/<repository-name>.git/ directory of the repositories you do want to be available publicly.

After making your changes, run ps -A | grep 'git' and then run a kill <process-id> to reload git-daemon with your new configuration.

Hope that helps!

Source: http://sharplearningcurve.com/blog/post/2010/02/06/Chasing-The-CI-Grail-e28093-Setup-Gitosis-From-Scratch.aspx ("Update Git-Daemon Configuration")

share|improve this answer

Your Answer


