Home | 簡體中文 | 繁體中文 | 雜文 | Search | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | Email

第 8 章 git-daemon 伺服器

目錄

8.1. git-daemon - A really simple server for git repositories
8.2. git-daemon-sysvinit
8.3. inet.conf / xinetd 方式啟動
8.4. git-daemon-run
8.5. Testing

8.1. git-daemon - A really simple server for git repositories

在/home/gitroot/ 上運行 git 守護進程

$ cd /home/gitroot
$ mkdir test.git
$ cd test.git
$ git --bare init --shared
Initialized empty shared Git repository in /home/gitroot/test.git/
		
		
git daemon --verbose --export-all --base-path=/home/gitroot --enable=receive-pack --reuseaddr
		
		

允許push,否則該倉庫只能clone/pull

sudo git daemon --verbose --export-all --base-path=/home/gitroot --enable=upload-pack --enable=upload-archive --enable=receive-pack
		

或者增加配置項

$ git config daemon.receivepack true
$ git config --file config receive.denyCurrentBranch ignore
		
comments powered by Disqus