Gitデーモンは指定されたデフォルトパスを使用しません。

Gitデーモンは指定されたデフォルトパスを使用しません。

私は次の構成を持っています/etc/xinetd.d/git

# description: The git server offers access to git repositories
service git
{
        disable = no
        type            = UNLISTED
        port            = 9418
        socket_type     = stream
        wait            = no
        user            = nobody
        server          = /usr/bin/git
        server_args     = daemon --inetd --export-all --base-path=/home/git
        log_on_failure  += USERID
}

リポジトリを複製しようとすると、git clone git://10.1.1.10/cabinet_labels.gitログに無効なデフォルトパスを参照しているとマークされます。

2016-05-12_18:25:17.21483 git-daemon starting.
2016-05-12_18:25:17.33264 [403] Ready to rumble
2016-05-12_18:26:33.45470 [976] Connection from 10.1.1.8:56960
2016-05-12_18:26:33.45485 [976] Extended attributes (16 bytes) exist <host=10.1.1.10>
2016-05-12_18:26:33.45514 [976] Request upload-pack for '/cabinet_labels.git'
2016-05-12_18:26:33.45525 [976] '/var/lib/cabinet_labels.git' does not appear to be a git repository
2016-05-12_18:26:33.45618 [403] [976] Disconnected (with error)

誰かが私がここで何を見逃しているのか教えてもらえますか?

ベストアンサー1

編集する正しい構成ファイルはです。に/etc/sv/git-daemon/run変更し、--base-path=/var/lib--base-path=/home/git/var/lib/git/home/git

#!/bin/sh
exec 2>&1
echo 'git-daemon starting.'
exec chpst -ugitdaemon \
  "$(git --exec-path)"/git-daemon --verbose --reuseaddr \
  --export-all --base-path=/home/git /home/git

おすすめ記事