2009年4月12日 星期日

How To Help FormosaBBS (一)

Formosa BBS Community Edition (以下簡稱為,FBCE) 是由一群佛心來著人士所維護之 BBS 開放原碼,如果您也願意來協助 FBCE 開發,在此提供以下方法:(感謝 coodavid, kmwang, pigfoot, zmx 幫忙補齊)


1. FBCE 目前開放原碼 hosting 於 GitHub, 在此建議您也申請一個 github account 方便 code merge.
GitHub -> Sign up now!

2. 產生 ssh key pair, 此用於 code 傳送。(詳細可參考:Providing your SSH Key)
$ ssh-keygen -b 4096 -t rsa -f ~/.ssh/github.id_rsa
Generating public/private rsa key pair.
Created directory '/home/account/.ssh'.
Enter passphrase (empty for no passphrase): (存取此 key 的密碼)
Enter same passphrase again:
Your identification has been saved in /home/account/.ssh/github.id_rsa.
Your public key has been saved in /home/account/.ssh/github.id_rsa.pub.
The key fingerprint is:aa:bb:cc:dd:ee:ff:1a:1b:1c:1d:1e:1f:2a:2b:2c:2d account@host
The key's randomart image is:
+--[ RSA 4096]----+
Orz...
>_<...
O_o...
. . E...
+------------------+

3. 上傳您所產生出來的 public key 至 github.
$ cat ~/.ssh/github.id_rsa.pub
ssh-rsa 一大串落落長的亂數= account@host
將 cat 出來的一整串文字複製貼上到
github -> account -> SSH Public Keys -> add another public key

4. ssh config 設定。
$ vi ~/.ssh/config
貼上以下文字
Host github.com
User git
Port 22
Hostname github.com
IdentityFile ~/.ssh/github.id_rsa
TCPKeepAlive yes
IdentitiesOnly yes

5. 取回 FBCE 原始碼。
在此分成兩種方法:
5.1. 如果你是 committer & have github account
$ git clone git@github.com:pigfoot/formosa.git
Initialized empty Git repository in /home/account/formosa/.git/
The authenticity of host 'github.com (65.74.177.129)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,65.74.177.129' (RSA) to the list of known hosts.
Enter passphrase for key '/home/account/.ssh/github.id_rsa': (請輸入在 Step2 所 keyin 的密碼)
remote: Counting objects: 1290, done.
remote: Compressing objects: 100% (1164/1164), done.
remote: Total 1290 (delta 616), reused 612 (delta 111)
Receiving objects: 100% (1290/1290), 1.57 MiB 619 KiB/s, done.
Resolving deltas: 100% (616/616), done.
5.2. 如果你不是 committer & have github account
http://github.com/pigfoot/formosa/tree/master click fork, 此動作會 fork 一份 code 到你自己的 Repositories. 然後再從你的帳號下載下來。
$ git clone git@github.com:你的ID/formosa.git
5.3. 如果你不是 committer & do not have github account
請直接寄 patch 給我們吧 XD

6. 確認原始碼是否有下載成功並設定基本環境。(詳細可參考:Global Git Config)
$ ls formosa/
$ git config --global github.user account
$ git config --global github.token "你的 API Token"
$ git config --global github.email "
account_AT_email"
$ git config --global color.branch auto
$ git config --global color.diff auto
$ git config --global color.interactive auto
$ git config --global color.status auto

$ git config --global user.name "YOUR NAME"
$ git config --global user.email "account_AT_email"

7. 同步更新原始碼。
$ cd formosa/
$ git fetch

Enter passphrase for key '/home/account/.ssh/github.id_rsa':
remote: Counting objects: 127, done.
remote: Compressing objects: 100% (65/65), done.
remote: Total 104 (delta 73), reused 61 (delta 39)
Receiving objects: 100% (104/104), 33.79 KiB, done.
Resolving deltas: 100% (73/73), completed with 18 local objects.
From git@github.com:pigfoot/formosa
* [new branch] login_query -> origin/login_query
70764ea..01756f2 master -> origin/master

8. 檢查 fetch 回來後的異動。
$ git status
# On branch master# Your branch is behind 'origin/master' by 20 commits, and can be fast-forwarded.
#nothing to commit (working directory clean)

9. 加入 mailing list.
http://groups.google.com/group/formosabbs


如果您有其他建議事項,歡迎來信跟我們詢問或至 bbs.CDPA.cc FormosaBBS 版反應。

歡迎您一起加入我們喔~ ^_^
Formosa BBS

延伸閱讀:How To Help FormosaBBS (二)

沒有留言:

張貼留言