How to Setup Gitblit(GIT server) in Ubuntu 16.04

Gitblit is an most popular opensource centralized Version Control System(VCS), build on java program. It is like a GitHub, which provides complete web-based control panel to create, manage and view the chnages of repository. Gitblit is complete solution for small and large company who can manage their codes in on premise server setup freely.

Features of Gitblit server:

web-frontend to manage the repositories
central place to share repositories
Access repository using SSH, http and GIT medinum
Manages users and access-control
Integrate with Ldap

Download Gitblit source code from website
$ wget http://dl.bintray.com/gitblit/releases/gitblit-1.8.0.tar.gz

Extract gitblit gz file
$ sudo tar -xvzf gitblit-1.8.0.tar.gz

Move directory to /opt location
$ sudo mv gitblit-1.8.0 /opt/gitblit

Chnage default gitblit http port
$ sudo vim.tiny /opt/gitblit/data/defaults.properties
server.httpPort = 80

Run Gitblit script
$ sudo sh gitblit.sh
2018-09-09 19:14:50 [INFO ]

2018-09-09 19:14:50 [INFO ] Running on Linux (4.4.0-21-generic)
2018-09-09 19:14:50 [INFO ] Logging initialized @651ms
2018-09-09 19:14:50 [INFO ] Using JCE Unlimited Strength Jurisdiction Policy files
2018-09-09 19:14:50 [INFO ] Generating Gitblit Certificate Authority (/opt/gitblit/data/certs/caKeyStore.p12)
2018-09-09 19:14:52 [INFO ] Generating Gitblit Certificate Authority CRL (/opt/gitblit/data/certs/caRevocationList.crl)
2018-09-09 19:14:52 [INFO ] Generating SSL certificate for localhost signed by Gitblit Certificate Authority (/opt/gitblit/data/serverKeyStore.jks)
2018-09-09 19:14:53 [INFO ] Importing Gitblit Certificate Authority into trust store (/opt/gitblit/data/serverTrustStore.jks)
2018-09-09 19:14:53 [INFO ] Setting up HTTPS transport on port 8443
2018-09-09 19:14:53 [INFO ] certificate alias = localhost
2018-09-09 19:14:53 [INFO ] keyStorePath = /opt/gitblit/data/serverKeyStore.jks
2018-09-09 19:14:53 [INFO ] trustStorePath = /opt/gitblit/data/serverTrustStore.jks
2018-09-09 19:14:53 [INFO ] crlPath = /opt/gitblit/data/certs/caRevocationList.crl
2018-09-09 19:14:53 [INFO ] Setting up HTTP transport on port 80
2018-09-09 19:14:53 [WARN ] Gitblit needs to run with ROOT permissions for ports < 1024!
2018-09-09 19:14:53 [INFO ] Shutdown Monitor listening on port 8081
2018-09-09 19:14:53 [INFO ] jetty-9.2.13.v20150730
2018-09-09 19:14:54 [INFO ] NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
2018-09-09 19:14:54 [INFO ]
2018-09-09 19:14:54 [INFO ] —-[com.gitblit.manager.IRuntimeManager]—-
2018-09-09 19:14:54 [INFO ] Basefolder : /opt/gitblit/data
2018-09-09 19:14:54 [INFO ] Settings : /opt/gitblit/data/gitblit.properties
2018-09-09 19:14:54 [INFO ] JVM timezone: Asia/Kolkata (IST +0530)
2018-09-09 19:14:54 [INFO ] App timezone: Asia/Kolkata (IST +0530)
2018-09-09 19:14:54 [INFO ] JVM locale : en_IN
2018-09-09 19:14:54 [INFO ] App locale : <client>
2018-09-09 19:14:54 [INFO ]
2018-09-09 19:14:54 [INFO ] —-[com.gitblit.manager.INotificationManager]—-
2018-09-09 19:14:54 [WARN ] Mail service disabled.
2018-09-09 19:14:54 [INFO ]
2018-09-09 19:14:54 [INFO ] —-[com.gitblit.manager.IUserManager]—-
2018-09-09 19:14:54 [INFO ] ConfigUserService(/opt/gitblit/data/users.conf)
2018-09-09 19:14:54 [INFO ]
2018-09-09 19:14:54 [INFO ] —-[com.gitblit.manager.IAuthenticationManager]—-
2018-09-09 19:14:54 [INFO ] External authentication disabled.
2018-09-09 19:14:54 [INFO ]
2018-09-09 19:14:54 [INFO ] —-[com.gitblit.transport.ssh.IPublicKeyManager]—-
2018-09-09 19:14:54 [INFO ] FileKeyManager (/opt/gitblit/data/ssh)
2018-09-09 19:14:54 [INFO ]
2018-09-09 19:14:54 [INFO ] —-[com.gitblit.manager.IRepositoryManager]—-
2018-09-09 19:14:54 [INFO ] Repositories folder : /opt/gitblit/data/git
2018-09-09 19:14:54 [INFO ] Identifying repositories…
2018-09-09 19:14:54 [INFO ] 0 repositories identified with calculated folder sizes in 23 msecs
2018-09-09 19:14:54 [INFO ] Lucene will process indexed branches every 2 minutes.
2018-09-09 19:14:54 [INFO ] Garbage Collector (GC) is disabled.
2018-09-09 19:14:54 [INFO ] Mirror service is disabled.
2018-09-09 19:14:54 [INFO ] Alias ‘UTF8’, UTF-9 & UTF-18 encodings as UTF-8 in JGit
2018-09-09 19:14:54 [INFO ] Preparing 14 day commit cache. please wait…
2018-09-09 19:14:54 [INFO ] 0 repositories identified with calculated folder sizes in 0 msecs
2018-09-09 19:14:54 [INFO ] built 14 day commit cache of 0 commits across 0 repositories in 2 msecs
2018-09-09 19:14:54 [INFO ]
2018-09-09 19:14:54 [INFO ] —-[com.gitblit.manager.IProjectManager]—-
2018-09-09 19:14:54 [INFO ]
2018-09-09 19:14:54 [INFO ] —-[com.gitblit.manager.IFederationManager]—-
2018-09-09 19:14:54 [INFO ]
2018-09-09 19:14:54 [INFO ] —-[com.gitblit.tickets.ITicketService]—-
2018-09-09 19:14:54 [INFO ] NullTicketService started
2018-09-09 19:14:54 [INFO ]
2018-09-09 19:14:54 [INFO ] —-[com.gitblit.manager.IGitblit]—-
2018-09-09 19:14:54 [INFO ]
2018-09-09 19:14:54 [INFO ] —-[com.gitblit.manager.IServicesManager]—-
2018-09-09 19:14:54 [INFO ] Federation passphrase is blank! This server can not be PULLED from.
2018-09-09 19:14:54 [INFO ] Fanout PubSub service is disabled.
2018-09-09 19:14:54 [INFO ] Git Daemon is listening on 0.0.0.0:9418
2018-09-09 19:14:54 [INFO ] Generating RSA-2048 SSH host keypair…
2018-09-09 19:14:55 [INFO ] Generating DSA SSH host keypair…
2018-09-09 19:14:56 [INFO ] SSH Daemon (NIO2) is listening on 0.0.0.0:29418
2018-09-09 19:14:56 [INFO ]
2018-09-09 19:14:56 [INFO ] —-[com.gitblit.manager.IFilestoreManager]—-
2018-09-09 19:14:56 [INFO ] No filestore metadata file found
2018-09-09 19:14:56 [INFO ]
2018-09-09 19:14:56 [INFO ] —-[com.gitblit.manager.IPluginManager]—-
2018-09-09 19:14:56 [INFO ] PF4J version 1.8.0 in ‘deployment’ mode
2018-09-09 19:14:56 [INFO ] Enabled plugins: []
2018-09-09 19:14:56 [INFO ] Disabled plugins: []
2018-09-09 19:14:56 [INFO ] No plugins
2018-09-09 19:14:56 [INFO ]
2018-09-09 19:14:56 [INFO ] All managers started.
2018-09-09 19:14:56 [INFO ]
2018-09-09 19:14:56 [INFO ] [GitBlitWebApp] init: Wicket core library initializer
2018-09-09 19:14:56 [INFO ] [GitBlitWebApp] init: Wicket extensions initializer
2018-09-09 19:14:56 [INFO ] [GitBlitWebApp] Started Wicket version 1.4.22 in deployment mode
2018-09-09 19:14:56 [INFO ] Started o.e.j.w.WebAppContext@4b65d9f4{/,file:/opt/gitblit/data/temp/webapp/,AVAILABLE}{file:/opt/gitblit/gitblit.jar}
2018-09-09 19:14:56 [INFO ] Started ServerConnector@690fb24c{SSL-HTTP/1.1}{0.0.0.0:8443}
2018-09-09 19:14:56 [INFO ] Started ServerConnector@693fc994{HTTP/1.1}{0.0.0.0:80}
2018-09-09 19:14:56 [INFO ] Started @6879ms

Run script in background
$ sudo sh gitblit.sh &

Access Gitblit with URL
http://server-ip
username: admin
password: admin

 

 

Leave a Reply

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

*
*