Deploying Apps via Gitblit
Storing and Deploying Applications via Gitblit
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.
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.
After provisioning finishes, the new environment appears in the dashboard.
Deploy Gitblit
3Download the Gitblit WAR package
Open the official Gitblit website and download the required release as a .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.
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.
When deployment is complete, click Open in Browser to open Gitblit.
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.
7Open the Repositories section
Select Repositories from the top navigation and click Create Repository.
8Configure the repository
Enter a repository name such as GitBlitRepo, adjust access and project settings when required, and click Create.
The empty repository is displayed after creation. Copy its Git URL for use on the local development computer.
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, commonlyorigin.{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
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.
What’s next?
- Deployment Manager
- Git & SVN Auto-Deploy
- SSH Access to Git Repository
- Java VCS Deployment with Maven
