Deploying Apps via Gitblit

Storing and Deploying Applications via Gitblit

Gitblit is a lightweight Git repository-management service designed for small teams that need centralised repositories, browser-based repository access, user permissions, and simple project administration.

This guide explains how to host Gitblit on the platform, create a repository, push a local project, and connect that repository to an application environment for deployment.

Create an Environment

1Open the environment wizard

Sign in to the platform dashboard and click New Environment.

Create a new environment
Open the environment wizard from the dashboard.

2Select the Java application server

Choose the Java language tab and select a supported Tomcat application server. Configure the resources, enter an environment name such as gitblit, and click Create.

Create a Tomcat environment for Gitblit
Configure the Java environment used to host Gitblit.

After provisioning finishes, the new environment appears in the dashboard.

Created Gitblit environment
The environment is ready for Gitblit deployment.

Deploy Gitblit

3Download the Gitblit WAR package

Open the official Gitblit website and download the required release as a .war archive.

Download Gitblit WAR package
Download the deployable Gitblit WAR archive.

4Upload the package

Return to the platform dashboard and open Deployment Manager. Select Local File, browse to the downloaded WAR file, and click Upload.

Upload the Gitblit WAR archive
Upload the Gitblit package through Deployment Manager.

5Deploy the package

After the archive appears in Deployment Manager, click Deploy to… and select the Gitblit environment. Enter a custom context when required, or leave the field empty to deploy to the default ROOT context.

Deploy Gitblit to the environment
Select the environment and deployment context.

When deployment is complete, click Open in Browser to open Gitblit.

Open Gitblit in a browser
Open the deployed Gitblit application.

Create a Gitblit Repository

6Sign in to Gitblit

Open the Gitblit page and sign in with the initial administrator credentials supplied by the package. Older Gitblit releases commonly use admin/admin.

Security requirement: Change the default administrator password immediately after the first sign-in.
Gitblit login page
Sign in to the Gitblit administration interface.

7Open the Repositories section

Select Repositories from the top navigation and click Create Repository.

Create a Gitblit repository
Open the repository-creation form.

8Configure the repository

Enter a repository name such as GitBlitRepo, adjust access and project settings when required, and click Create.

Configure a new Gitblit repository
Set the repository name and optional permissions.

The empty repository is displayed after creation. Copy its Git URL for use on the local development computer.

Empty Gitblit repository
The new repository is ready to receive project files.

Push a Local Project

Open a terminal in the project folder and initialise the local Git repository:

git init

Add the Gitblit repository as a remote:

git remote add {name} {repo_url}
  • {name} — local name for the remote, commonly origin.
  • {repo_url} — Git URL copied from Gitblit.

Add the project files and create the first commit:

git add .
git commit -m "Initial commit"

Push the project to Gitblit:

git push -u {name} master
For repositories using main as the default branch, replace master with main.

Refresh the Gitblit repository page to confirm that the project files and commit history are available.

Deploy an Application from Gitblit

9Create the application environment

Prepare a compatible target environment for the project language and application stack.

10Add the Git project

Click Add Project for the application-server or Maven layer. Select Git and enter the Gitblit repository URL, branch, project name, deployment context, and authentication details.

Enable automatic repository checks when the application should be updated after new commits are pushed. Save the project and start the initial deployment.

Use a Maven build node for Java projects that require compilation. Interpreted applications can usually be deployed directly to a compatible application server.

What’s next?

  • Deployment Manager
  • Git & SVN Auto-Deploy
  • SSH Access to Git Repository
  • Java VCS Deployment with Maven