2011-04-01 99 views
3

我分享我的如何在Ubuntu上安裝Git進程10.04

 
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

什麼我丟了?

回答

3

在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 

請注意,主機名後面的/是必需的。

4

在我的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守護程序配置」)

相關問題