GitBucket

https://github.com/gitbucket/gitbucket
GitHub のようなインタフェースのリポジトリ管理サイト構築ツールGitBucket を使ってみました。
JRE のインストール
$ sudo apt-get install default-jre |
GitBucket の動作にはJava8 が必要とのことです。
GitBucket のダウンロード
https://github.com/gitbucket/gitbucket/releases
プラグインのインストール
http://gitbucket-plugins.github.io/ からダウンロードして、~/.gitbucket/plugins/ に格納する。
- https://github.com/gitbucket/gitbucket-gist-plugin/releases
- https://github.com/yaroot/gitbucket-pages-plugin/releases
GitBucket の起動
$ java -jar gitbucket.war --port=18080 |
--port=[NUMBER]
--prefix=[CONTEXTPATH]
--host=[HOSTNAME]
--gitbucket.home=[DATA_DIR]
GitBucket へアクセス
http://localhost:18080/ をブラウザで開く。
初回はroot/root でログインする。
SSH アクセスの有効化
System administration - System settings
| 項目 | 値 |
|---|---|
| Base URL | http://localhost:18080 |
| Enable SSH access to git repository | Checked |
| SSH Host | localhost |
| SSH Port | 10022 |
アカウントの追加
右上のアイコンからSystem administrationを選択する。
User Management でNew Userを選択する。
git ユーザの設定
$ git config --global user.name "me" |
SSH Key の登録
$ ssh-keygen |
登録したユーザアカウントでログインして、Account settings - SSH Keys
| 項目 | 値 |
|---|---|
| Title | 任意の名称 |
| Key | ~/.ssh/id_rsa.pub の中身を貼り付け |
リポジトリの作成
New repository ボタンを押下する。
リポジトリのクローン
$ git clone http://localhost:18080/git/me/my-repo.git |
または、
$ git clone ssh://me@localhost:10022/me/my-repo.git |
Comments