[FreeBSD] 簡易架設 git Server,git 使用教學

Git 是一套免費 open source 的版本控制軟體,另外還有很多套版本控制軟體,如:MercurialBazaarSubversionCVSPerforce, and Visual SourceSafe,其中 Mercurial 又是 Google Code Project Hosting 採用的版本控制系統,當然 google 也支援原本的 Subversion,Git 為現在很紅的一套版本控制 Software,底下紀錄在 FreeBSD 如何架設簡易 Git Server。 1. 利用 FreeBSD ports 安裝:

cd /usr/ports/devel/git; make install clean
2. 修改 /etc/rc.conf
git_daemon_enable="YES"
git_daemon_directory="/path/git/repo"
git_daemon_flags="--export-all --syslog --enable=receive-pack --listen=192.168.1.1"
注意 git\_daemon\_flags 可以加入 --verbose 參數,以方便 debug 3. 新增使用者 git
pw user add git
4. 啟動 git daemon
/usr/local/etc/rc.d/git_daemon start
您會發現多出 9418 連接埠,就是成功了 [Read More]