目录中有一些 git 裸仓库/home/git/repositories
。
我使用git-daemon-run
服务 git 协议来访问这些存储库。
例如/home/git/repositories/root/spider.git
是一个裸 git repo。
这是命令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
我检查系统日志/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)