在/home/git/repositories目录中有一些git赤裸裸的存储库。
我使用git-daemon-run serve git协议来访问这些repos。
例如,/home/git/repositories/root/spider.git是一个纯粹的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)发布于 2013-03-08 14:56:19
从错误消息中,仔细检查您的路径并确保您执行了
cd /home/git/repositories/root/
git init --bare spider如果存储库已经存在,但直接在'/home/git/repositories‘中,那么您需要调整您git clone命令:
git clone git://hostname/spider.git最后,确保git-daemon进程有权访问存储库。
运行git-守护程序的帐户必须能够访问/home/git/repositories/root/sipder.git。
发布于 2015-08-08 10:16:30
将--enable=receive-pack添加到git daemon命令行,以启用send-pack (manual)支持。然后,您将需要git reset --hard。
发布于 2013-03-17 01:34:58
在repo目录中创建一个名为git-daemon-export-ok的空文件。
https://stackoverflow.com/questions/15285938
复制相似问题