2

ディレクトリにいくつかの git ベア リポジトリがあります/home/git/repositories。これらのリポジトリにアクセスするには、serve git プロトコルを
使用します。 たとえば、裸の git リポジトリです。git-daemon-run
/home/git/repositories/root/spider.git

コマンドps -ef | grep git結果です。

120       9638  1062  0 10:44 ?        00:00:00 /usr/local/libexec/git-core/git-daemon --verbose --reuseaddr --base-path=/home/git/repositories --export-all --max-connections=64 -- /home/git/repositories

実行するとgit clone git://hostname/root/spider.git、次のようになります。

Cloning into 'spider'...
fatal: remote error: access denied or repository not exported: /root/spider.git

syslog を確認すると、次の/var/log/git-daemon/currentようになります。

2013-03-08_02:56:02.42145 [9698] Connection from 127.0.0.1:60080
2013-03-08_02:56:02.42149 [9698] Extended attributes (22 bytes) exist <host=hostname>
2013-03-08_02:56:02.42186 [9698] Request upload-pack for '/root/spider.git'
2013-03-08_02:56:02.42189 [9698] '/home/git/repositories/root/spider.git' does not appear to be a git repository
2013-03-08_02:56:02.42221 [9638] [9698] Disconnected (with error)
4

3 に答える 3

3

(手動) サポートを有効にするには、コマンド ラインに追加 --enable=receive-packします。その後、する必要があります。git daemonsend-packgit reset --hard

于 2015-08-08T02:16:29.687 に答える
2

エラーメッセージから、パスを再確認し、実行したことを確認してください

cd /home/git/repositories/root/
git init --bare spider

そのレポが既に存在しているが、直接 ' ' にある場合は、コマンド/home/git/repositoriesを調整する必要があります。git clone

 git clone git://hostname/spider.git

最後に、プロセス git-daemon にリポジトリへのアクセス権があることを確認します

git-dameon を実行しているアカウントは、にアクセスできる必要があります/home/git/repositories/root/sipder.git

于 2013-03-08T06:56:19.240 に答える
1

リポジトリ ディレクトリに git-daemon-export-ok という空のファイルを作成します。

于 2013-03-16T17:34:57.753 に答える