How to setup GitBucket locally

Server

GitBucket is a Git platform powered by Scala with easy installation, high extensibility & GitHub API compatibility. I use it in unusual way, because I run it on my laptop just for version control and private code archive. It’s a good solution for hobbyists and freelancers working on their own projects.

Let’s install GitBucket locally

  1. First download latest release of gitbucket.war file.
  2. Optionally install java 8 (if you don’t have it already).
  3. Create file gitbucket.conf in catalog with gitbucket.war in location like: /home/user/GIT/gitbucket.conf
  4. Edit that file.
allow_anonymous_access=false
plugin.networkInstall=true
is_create_repository_option_public=true
base_url=http\://gitbucket\:9999
ssh=false
skinName=skin-purple
ssh.host=localhost
showMailAddress=false
allow_account_registration=false
ssh.port=29418
ldap_authentication=false
notification=false
useSMTP=false
oidc_authentication=false
gravatar=true

5. Add gitbucket host with 127.1.1.1 to /etc/hosts

sudo -i gedit /etc/hosts

6. Write line to the file then save:

127.1.1.1	gitbucket

7. Run GitBucket by typing in console. (you can add this code as run command for startup)

java -jar "/home/user/GIT/gitbucket.war" --port=9999 --gitbucket.home="/home/user/GIT/"

What we have done?

Right now our GitBucket is available by typing in browser: gitbucket:9999. You are free to change port number and name of the host. It is also possible to change the localisation of database by editing –gitbucket.home parameter. Login in with ID: root / Pass: root.

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *