# GitBucket¶

## はじめに¶

GitHubクローンの1つで、scalaで書かれてjavaで実行します。オープンソースで次のURLで公開されています。
https://github.com/takezoe/gitbucket

なお、GitHubのissuesには英語で登録をお願いしますとのこと（海外ユーザーも多い）。

## インストール¶

### CentOS 6/7用RPMのインストール¶

#### 新規インストール¶

# yum localinstall gitbucket-3.8-1.noarch.rpm

Setting up Local Package Process
Examining gitbucket-3.8-1.noarch.rpm: gitbucket-3.8-1.noarch
Marking gitbucket-3.8-1.noarch.rpm to be installed
:
Installed:
gitbucket.noarch 0:3.8-1

Complete!
#

#### バージョンアップ¶

# yum localupdate gitbucket-3.8-1.el6.noarch.rpm
Setting up Local Package Process
xamining gitbucket-3.8-1.noarch.rpm: gitbucket-3.8-1.noarch
Marking gitbucket-3.8-1.noarch.rpm as an update to gitbucket-3.7-1.noarch
:
Updated:
gitbucket.noarch 0:3.8-1

Complete!
#
##### GitBucket 3.13以前からGitBucket 4.0以降へアップデートするには¶

GitBucket 3.13（を含みそれ）以前からGitBucket 4.0（を含みそれ）以降へアップデートする際は、いったんGitBucket 3.14にアップデートし、それからGitBucket 4.0以降にアップデートしてください。

~$sudo yum localupdate ./gitbucket-4.3-1.noarch.rpm : トランザクションを実行しています gitbucket 4.0 can only be upgrade from 3.14 エラー: %pre(gitbucket-4.3-1.noarch) scriptlet failed, exit status 1 Error in PREIN scriptlet in rpm package gitbucket-4.3-1.noarch エラー: install: スクリプト %pre の実行に失敗しました (2)。gitbucket-4.3-1 を スキップします。 Verifying : gitbucket-4.3-1.noarch 1/2 gitbucket-3.13-1.noarch was supposed to be removed but is not! Verifying : gitbucket-3.13-1.noarch 2/2 失敗: gitbucket.noarch 0:3.13-1 gitbucket.noarch 0:4.3-1 ##### GitBucket 3.10で内蔵H2DBのバージョンを1.4.180から1.4.190に更新したことによるエラー¶ GitBucketを3.9から3.10.1にアップデートしてみたところ、Webブラウザからアクセスした際にH2DBのエラーが発生しました。 org.h2.jdbc.JdbcSQLException: テーブル "ACTIVITY" が見つかりません Table "ACTIVITY" not found; SQL statement: : この問題については、対策が2つ用意されています。 1. マイグレートツールを使ってデータベース移行 2. H2DB 1.4.180を内蔵したGitBucket 3.10.1 このH2DBの更新の理由は次のとおりですので、できる限り新しい版を使いたいところです。 データストアの信頼性向上のため、GitBucketが内部で使用しているH2データベースを最新版である1.4.190にバージョンアップしました。 そこで、マイグレートを実施してみることにします。 work$ git clone https://github.com/gitbucket/h2-migration.git
work$cd h2-migration/ h2-migration$ vi migration.sh

#!/bin/sh

+ export GITBUCKET_HOME=/var/lib/gitbucket
export H2_USER=sa

ですが実行するとエラーに

:
~\$

#### Ver. 2.6以前¶

##### Ver. 2.6¶

2014-11-24作成のVer.2.6のRPMパッケージです。起動スクリプトをgitbucketユーザーで実行する設定に変更してビルドしました。

##### 公開されている設定でビルドしたRPMパッケージ（Ver.2.1）¶

root権限で実行されるGitBucketのRPM

そのSPECファイル

##### gitbucketユーザーで実行する設定に変更してビルドしたRPMパッケージ（Ver.2.4.1）¶

そのSPECファイル

serviceで制御するスクリプト

## 設定¶

### メモリ・CPU使用率の調整¶

Linuxマシン（CentOS 6 64bit版、OpenJDK 1.8.0.51）でGitBucketのwarファイルを実行したときのgitbucketプロセス（java）のメモリとCPUはtopコマンドで次のようになっています。

PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
6174 gitbucke  20   0 1444m 109m  13m S  1.0 11.0 141:31.36 java

## 本記事へのコメント（中止）¶

• 注）本記事と関連のないと管理者が判断したコメントは削除させていただくことがあります。

### コメント一覧¶

• #### 匿名ユーザー が10ヶ月前に追加

4.1-1から4.5-1へのアップデートをしようとしたところ以下のように失敗します。
1. yum update gitbucket-4.5-1.noarch.rpm
読み込んだプラグイン:fastestmirror, refresh-packagekit, security
更新処理の設定をしています
gitbucket-4.5-1.noarch.rpm を調べています: gitbucket-4.5-1.noarch
次のリポジトリーへの更新として gitbucket-4.5-1.noarch.rpm を設定します: gitbucket-4.1-1.noarch
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> Package gitbucket.noarch 0:4.1-1 will be 更新
---> Package gitbucket.noarch 0:4.5-1 will be an update
--> 依存性解決を終了しました。

依存性を解決しました

========================================================================================================================================================================================================
パッケージ アーキテクチャ バージョン リポジトリー 容量 ========================================================================================================================================================================================================
更新:
gitbucket noarch 4.5-1 /gitbucket-4.5-1.noarch 45 M

トランザクションの要約 ========================================================================================================================================================================================================
アップグレード 1 パッケージ

合計容量: 45 M
これでいいですか? [y/N]y
パッケージをダウンロードしています:
rpm_check_debug を実行しています
トランザクションのテストを実行しています
トランザクションのテストを成功しました
トランザクションを実行しています
gitbucket 4.0 can only be upgrade from 3.14
エラー: %pre(gitbucket-4.5-1.noarch) scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package gitbucket-4.5-1.noarch
エラー: install: スクリプト %pre の実行に失敗しました (2)。gitbucket-4.5-1 をスキップします。
gitbucket-4.1-1.noarch was supposed to be removed but is not!
Verifying : gitbucket-4.1-1.noarch 1/2
Verifying : gitbucket-4.5-1.noarch 2/2

失敗:
gitbucket.noarch 0:4.1-1 gitbucket.noarch 0:4.5-1

完了しました!

• #### 高橋 徹 が9ヶ月前に追加

4.1～4.5のRPMに問題がありました。4.6で修正しました。コメントありがとうございます。

• #### 匿名ユーザー が19日前に追加

ウブロブランドコピー(N級品)販売通販専門店
ウブロコピー、ウブロブランドコピー、ウブロコピー時計、
ウブロコピー代引き、ウブロコピー 時計通販、ブランドコピー、
各種海外有名ブランド時計品を豊富に取り揃え、
しかもお客様を第一と考えて、驚きの低価格で提供しております
カルティエ 時計 http://www.bbagok.com

• #### 匿名ユーザー が18日前に追加

I'm just commenting to let you know what a fine discovery my friend's princess had visiting your webblog. She realized a good number of things, which included what it's like to possess a very effective coaching spirit to make the mediocre ones without difficulty gain knowledge of specified grueling issues. You actually exceeded readers' expected results. Many thanks for displaying such invaluable, trusted, revealing and fun guidance on this topic to Mary.
yeezy shoes http://onj.me/yzyorg

• #### 匿名ユーザー が17日前に追加

You need to participate in a contest for among the finest blogs on the web. I will suggest this website!
yeezy boost http://www.yeezyboost.com.co

• #### 匿名ユーザー が16日前に追加

Listening to music whilst you do your aerobic workouts can help inspire you and look after the interest rate. If you use aerobic workout videos, just reject the volume after you have memorized the http://annonces.antoniovinci.be/author/userelish81 routine.Prior to you signing http://www.meerutbazaar.com/author/userelish81 up for any aerobics classes, check out and view an entire workout session if http://www.marcheafrique.net/author/userelish81 at all possible. This will help see whether the degree of intensity and length of time meets your needs. This can also assist you to mentally plan for the classes should you choose choose to http://toyrentals.ca/author/userelish81 join.

• #### 匿名ユーザー が16日前に追加

https://nhanceontario.ca/etobicoke/service/basic-cabinet-renewal/ When considering refinishing or even replacing kitchen cabinetry, one from the major queries to deal with is whether to possess painted or even stained kitchen area cabinets. And when this concern is what's boggling the mind right right now, then continue reading to understand the benefits and drawbacks of every cabinetry complete choice.

• #### 匿名ユーザー が14日前に追加

I precisely had to thank you very much once more. I am not sure what I would've followed in the absence of the type of thoughts revealed by you concerning such theme. It had become a very frightful situation in my circumstances, nevertheless witnessing the professional form you dealt with the issue took me to weep with contentment. Extremely thankful for this assistance as well as sincerely hope you recognize what a great job your are undertaking teaching the others through your websites. I am sure you have never met all of us.
yeezy boost http://www.boostyeezy.us.com

• #### 匿名ユーザー が13日前に追加

This site is known as a walk-through for all of the information you wanted about this and didn抰 know who to ask. Glimpse here, and also you抣l positively discover it.

• #### 匿名ユーザー が12日前に追加

http://www.saloonofgames.com/profile/legitsteroidpowd/ "One proclaiming that is definitely at the rear of my mind - that we always give thought to - 'don't quit what you would like most for which you would like now'. I http://www.jeux-poker-gratuit.com/profile/steroidsgermanyc know, to me, I would like to play nfl and college football - I knew that college was a thing that I want to to perform, I wanted to obtain a college diploma. And if there is a way that I really could understand it taken care of through football, when it could help me have a scholarship to pay for it, then that might be a tremendous blessing, as well as a big plus - not only personally, but http://www.mcvj.com/profile/steroidspowderf in addition for my children it could help financially. It definitely meant a http://www.sveosvemu.com/igre/profile/219706/Chinasteroidssup lot of sacrifices, however desired to play nfl and college football.

• #### 匿名ユーザー が10日前に追加

There are definitely quite a lot of particulars like that to take into consideration. That could be a great point to deliver up. I provide the ideas above as basic inspiration but clearly there are questions like the one you deliver up where a very powerful thing might be working in trustworthy good faith. I don?t know if best practices have emerged round things like that, however I am certain that your job is clearly recognized as a good game. Both girls and boys feel the impact of only a second抯 pleasure, for the remainder of their lives.

• #### 匿名ユーザー が10日前に追加

I wanted to type a word so as to appreciate you for all of the stunning pointers you are giving at this site. My considerable internet search has finally been recognized with awesome concept to share with my contacts. I would suppose that most of us site visitors are undeniably lucky to be in a good site with very many marvellous individuals with helpful principles. I feel really lucky to have seen your site and look forward to plenty of more amazing times reading here. Thank you once again for a lot of things.

• #### 匿名ユーザー が9日前に追加

The following time I read a blog, I hope that it doesnt disappoint me as much as this one. I imply, I do know it was my choice to learn, however I really thought youd have one thing attention-grabbing to say. All I hear is a bunch of whining about something that you may fix if you werent too busy in search of attention.
roshe run http://www.rosherun.us.com

• #### 匿名ユーザー が6日前に追加

I wanted to send a quick word so as to express gratitude to you for those amazing techniques you are placing at this website. My rather long internet look up has finally been recognized with pleasant facts to share with my visitors. I 'd claim that many of us website visitors are extremely lucky to dwell in a remarkable site with very many brilliant people with very beneficial strategies. I feel truly happy to have come across your weblog and look forward to tons of more awesome minutes reading here. Thank you once more for all the details.
yeezy boost https://vtu.cc/yzyinc

• #### 匿名ユーザー が5日前に追加

This actually answered my drawback, thanks!
kyrie irving shoes http://www.kyrieirving-shoes.us.com

• #### 匿名ユーザー が4日前に追加

My wife and i got now thrilled when Jordan managed to round up his studies via the precious recommendations he made through the web site. It is now and again perplexing just to find yourself giving away ideas that many others might have been trying to sell. And we all already know we've got the writer to appreciate for this. All of the illustrations you have made, the straightforward site navigation, the relationships your site make it easier to instill - it's most excellent, and it's really letting our son and our family do think the situation is interesting, which is certainly highly important. Thanks for the whole thing!
nmd https://v.gd/QwA25E

• #### 匿名ユーザー が3日前に追加

This really answered my drawback, thanks!
cheap jordans http://www.jordansforcheap.us.com

• #### 匿名ユーザー が2日前に追加

I wish to voice my passion for your kindness giving support to persons that must have assistance with this concept. Your special commitment to passing the solution along turned out to be unbelievably important and have continuously permitted folks much like me to realize their goals. This useful report means a lot to me and somewhat more to my fellow workers. Regards; from everyone of us.

• #### 匿名ユーザー が約21時間前に追加

This website is known as a stroll-by way of for all of the info you wished about this and didn抰 know who to ask. Glimpse right here, and also you抣l undoubtedly discover it.
michael kors outlet http://www.michaelkors-outletonlines.us.com

クリップボードから画像を追加 (サイズの上限: 1 GB)