0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

RaspberryPiにGitbucketをインストールする

Posted at

GitbucketはGitHubのようなリポジトリ管理システムです。

必要なツールをインストール

sudo apt update
sudo apt install openjdk-8-jdk openjdk-8-jre
java -version
openjdk version "1.8.0_252"

環境変数を更新

#/etc/environment に以下を追加
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-armhf
JRE_HOME=/usr/lib/jvm/java-8-openjdk-armhf/jre

Gitbucketをダウンロード

sudo mkdir /opt/gitbucket
cd /opt/gitbucket
sudo wget -O gitbucket.war https://github.com/gitbucket/gitbucket/releases/download/4.33.0/gitbucket.war

起動

$ java -jar gitbucket.war
...(1分ほど掛かる)
2020-04-30 01:21:30.131:INFO:oejs.AbstractConnector:main: Started ServerConnector@6b2d4a{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
2020-04-30 01:21:30.133:INFO:oejs.Server:main: Started @71795ms

確認

ブラウザへ以下を指定してGitbucketへアクセスできればOK
http://[IPアドレス]:8080/
gitbucket.png

初期アカウントは、ID/PASS共に"root"のようだ。

リポジトリの作成〜Push

リポジトリ作成:

右上の+ボタン → New Repository
gitbucket2.png
Create Repository押下

リポジトリPush:

copy to clipboardからURIをコピー
gitbucket3.png
以下コマンドを実行する

git clone [copy to clipboardからコピーしたURI]
cd test
touch test.txt
git add test.txt
git commit -m "first commit"
git push

参考

gitbucket/releases
UbuntuにJava8環境構築
How to Install JAVA 8 on Ubuntu 18.04/16.04, Linux Mint 19/18
git push がエラーで失敗する

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?