在/home/git/repositories
dir中有一些git裸回購。
我使用git-daemon-run
服務git協議來訪問這些回購。
例如/home/git/repositories/root/spider.git
是一個純粹的git回購。爲什麼我可以使用git-daemon來服務我的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
當我exec的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)
謝謝您的回答,但問題還沒有解決。我仔細檢查了路徑並修改了我的命令。 – 2013-03-08 11:57:22
@王振威然後這是一個正確的問題?該進程是否有權訪問'/ home/git/repositories/root/sipder.git'?裸露的回購是爲root保護的嗎? – VonC 2013-03-08 12:05:04
謝謝!共鳴是,該過程沒有權限訪問回購,我已經解決了! – 2013-03-09 02:00:05