|  | 
| Github 500 error. | 
而 Github 的答覆是:
|  | 
| Github response about pull request. | 
不過,這些問題跟 500 錯誤有什麼關係呢?當發現新 branch 下 PR 會對應到 master 時就有個底了,答案是因為相對應的 branch 差異過大,導致 Github 發生 timout 例外。
Github 的回應是:
|  | 
| Github response about large diff for pull request | 
|  | 
| Github 500 error. | 
|  | 
| Github response about pull request. | 
|  | 
| Github response about large diff for pull request | 
$ cd ~/.ssh $ ssh-keygen -t rsa -C "account1@email.com" -f id_rsa_account1 $ ssh-keygen -t rsa -C "account2@email.com" -f id_rsa_account2
$ cd ~/.ssh $ touch config $ gedit config編輯內容如下
#account1
Host github.com-account1
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_rsa_account1
#account2
Host github.com-account2
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_rsa_account2
$ cd /path/to/repo1 $ git remote set-url origin ssh://git@github.com-account1/account1/repo1.git
$ git push Counting objects: 199918, done. Delta compression using up to 8 threads. Compressing objects: 100% (188542/188542), done. error: RPC failed; result=22, HTTP code = 413MiB | 53 KiB/s fatal: The remote end hung up unexpectedly Writing objects: 100% (199918/199918), 1.98 GiB | 7.61 MiB/s, done. Total 199918 (delta 55401), reused 0 (delta 0) fatal: The remote end hung up unexpectedly fatal: expected ok/error,...
git config http.postBuffer 524288000 #Set to 500MB
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
// uncomment the following to enable URLs in path-format 'urlManager'=>array( 'urlFormat'=>'path', 'showScriptName'=>false, 'urlSuffix'=>'.html', 'rules'=>array( '<controller:\w+>/<id:\d+>'=>'<controller>/view', '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>', '<controller:\w+>/<action:\w+>'=>'<controller>/<action>', ), ),這樣就可以將 index.php 藏起來並偽裝成 .html 的網址了。
|  | 
| 整合 Mantis 與 Gitolite | 
|  | 
| Post hook 的過程 | 
# 讀取輸入的物件檔案
while read oldrev newrev ref
do
    # 取得 commit 資訊
    subj=`git show -s --format="%s" $newrev`
    diff=`git show $newrev...$oldrev`
    msgs="$subj
$diff"
    # 將資訊餵給用來跟 mantis 同步的 perl 程式
    /home/gitolite/git2mantis.pl "$msgs"
    ...
done
#!/usr/bin/perl # # 使用者 mantis 的 ssh key 必須在 192.168.26.103 主機上設定好, # 才能允許自動登入。 $host = "mantis@192.168.0.1"; $sshcmd = "/usr/bin/ssh "; $phpcmd = "/usr/bin/php"; # mantis 的 checkin 程式 $checkincmd = "/var/www/mantis/scripts/checkin.php"; $msg = $ARGV[0]; # 透過 ssh 來執行遠端主機的程式 `$sshcmd $host $phpcmd $checkincmd <<< "$msg"`;
# 將當前狀態封存,並取出至指定位置 $ git archive HEAD | tar -x -C /path/to/export
# 建立一個獨立的分支 $ git checkout --orphan empty-branch # 清空所有東西 $ git rm -rf .
// 如果是變數: fish.age // 如果是指標: (*fish).age // 或 fish->age
$ cat ubuntu-12.10-desktop-amd64.iso > /dev/sdb