Linux nozim-desktop 2.6.32-24-generiC#43-Ubuntu SMP Thu Sep 16 14:17:33 UTC 2010 i686 GNU/Linux
和我我的仓库,当我运行:
sudo -u git git-daemon --base-path=/home/git/repositories/ --export-all
它说:
sudo: git-daemon: command not found
什么我丢了?
Linux nozim-desktop 2.6.32-24-generiC#43-Ubuntu SMP Thu Sep 16 14:17:33 UTC 2010 i686 GNU/Linux
和我我的仓库,当我运行:
sudo -u git git-daemon --base-path=/home/git/repositories/ --export-all
它说:
sudo: git-daemon: command not found
什么我丢了?
在Ubuntu的12.04,以下行为我工作开箱(你想分享的Git仓库执行它)的:
git daemon --export-all --base-path=$(pwd)
克隆共享仓库,使用
git clone git://HOSTNAME/ REPOSITORY_NAME
# e.g., git clone git://my-machine/ test-project
请注意,主机名后面的/
是必需的。
在我的Ubuntu 10.04系统遇到同样的问题后,我了解到git-daemon刚刚安装在其他地方,并且操作方式与我之前设置的指南期望的不同。
在我的系统,它位于/us/lib/git-core/git-daemon
要使用它,编辑文件/etc/service/git-daemon/run/
和修改参数,以满足您的需求。
这里是我的:
#!/bin/sh
exec 2>&1
echo 'git-daemon starting.'
exec chpst -ugitdaemon /usr/lib/git-core/git-daemon --verbose --base-path=/home/git/repositories
如果你希望所有的存储库可用公开,增加--export-all
,否则,/path/to/repositories/<repository-name>.git/
目录的仓库内运行touch git-daemon-export-ok
你想是可公开。
进行更改后,运行ps -A | grep 'git'
,然后运行kill <process-id>
以使用新配置重新加载git-daemon
。
希望有帮助!
来源:http://sharplearningcurve.com/blog/post/2010/02/06/Chasing-The-CI-Grail-e28093-Setup-Gitosis-From-Scratch.aspx( “更新的Git守护程序配置”)
谢谢,我会尽快尝试:) – Nozim 2012-08-29 12:34:20