Installing git daemon for the first time. I have it running:
[todd@hqdevgit01 test.git]$ ps -ef | grep git
501 3204 1 0 10:14 ? 00:00:00 git-daemon --reuseaddr --user=gitdaemon --group=blah-dev --detach --base-path=/var/blah/git-repo/
I have gitdaemon user set up as:
[todd@hqdevgit01 test.git]$ grep gitdaemon /etc/group
blah-dev:x:502:todd,gitdaemon
gitdaemon:x:503:
and the repository set up as:
[todd@hqdevgit01 test.git]$ ll /var/blah/git-repo/test.git
total 32
drwxrwsr-x. 2 root blah-dev 4096 May 1 10:11 branches
-rw-rw-r--. 1 root blah-dev 92 May 1 10:11 config
-rw-rw-r--. 1 root blah-dev 73 May 1 10:11 description
-rw-rw-r--. 1 root blah-dev 23 May 1 10:11 HEAD
drwxrwsr-x. 2 root blah-dev 4096 May 1 10:11 hooks
drwxrwsr-x. 2 root blah-dev 4096 May 1 10:11 info
drwxrwsr-x. 4 root blah-dev 4096 May 1 10:11 objects
drwxrwsr-x. 4 root blah-dev 4096 May 1 10:11 refs
THEN on the client
me@me:~/projects/test$ git remote add test todd@hqdevgit01:/test.git
me@me:~/projects/test$ git pull test
todd@hqdevgit01's password:
fatal: '/test.git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Not completely sure what I am missing here. I think the base path in the git daemon command should be all I need to tie out my directory and to present my repositories in the "root" path.
also tried to start as
git daemon --reuseaddr --user=gitdaemon --group=blah-dev --detach --base-path=/var/blah/git-repo/ /var/blah/git-repo/
no dice
added "git-daemon-export-ok"
[todd@hqdevgit01 test.git]$ ll
total 32
drwxrwsr-x. 2 root blah-dev 4096 May 1 10:11 branches
-rw-rw-r--. 1 root blah-dev 92 May 1 10:11 config
-rw-rw-r--. 1 root blah-dev 73 May 1 10:11 description
-rw-rw-r--. 1 todd blah-dev 0 May 1 10:36 git-daemon-export-ok
-rw-rw-r--. 1 root blah-dev 23 May 1 10:11 HEAD
drwxrwsr-x. 2 root blah-dev 4096 May 1 10:11 hooks
drwxrwsr-x. 2 root blah-dev 4096 May 1 10:11 info
drwxrwsr-x. 4 root blah-dev 4096 May 1 10:11 objects
drwxrwsr-x. 4 root blah
still not working (same error)
THis is a multi-faceted error - but I needed to path out the repo:
git remote add test todd@hqdevgit01:/var/blah/git-repo/test.git
ALSO as mentioned by FOLKOL (from my startup scrcipt):
USER=gitdaemon
GROUP=blah-dev
BASE_PATH=/var/blah/git-repo/
ARGS="--user=$USER --group=$GROUP --detach --reuseaddr --base-path=$BASE_PATH $BASE_PATH"
git daemon $ARGS