Gitblit-git Version Server Environment deployment

Source: Internet
Author: User

Gitblit Introduction

Gitblit is a pure Java library for managing, viewing, and working with Git repositories. Java management tool equivalent to GIT, Support Linux system.

Gitblit Server Deployment

First, install Gitblit-1.7.1.jar under CentOS

1. Download Gitblit-1.7.1.jar

2. Directory structure

3. Enter the Data directory

4. Copy the defaules.properties configuration file to My.peoperties

5. Modify My.peoperties

6. Change Gitblit.properties

7. Start Gitblit

nohup java -jar gitblit.jar > gitblit.log &

8. Start the log output information

(Turn on port number 8080 permissions)

Second, the configuration Gitblit

Browser opens http://47.88.29.228:8080

Login Admin user, member, team, project configuration, Default user name password is admin

1. User Management

2. New Team

3. Assigning Users and Permissions

4. Log in to individual users and view information about the user's warehouse

4. Copy the Git repository link

Third, idea configuration git (upload project)

1. Git,idea configuration for the native installation of the Windows version Git.exe

2. New Project Mygit (upload new project)

3.Push

4. View operational Records

using the Gitblit tool to create a git warehouse service under Linux

How to install the Gitblit tool on your Linux server or PC. First, let's look at what Git is, its functionality, and the steps to install Gitblit. Git is a distributed version control system that emphasizes speed, data consistency, and supports distributed, non-linear workflows. It was originally designed and developed by Linus Torvalds in 2005 for the Linux kernel, using GPLV2 certificates, and has since become the most widely used version control system in software development.

Gitblit is a fully open source software that is based on a purely Java stack and is designed to be a small to great project in terms of speed and efficiency in git warehouses. It is easy to learn and get started, and has lightning-like performance. It is much more than the SCM (versioning) tools such as Subversion, CVS, perforce, and clearcase, such as fast local branching, ease of staging, multiple workflows, and so on.

Features of the Gitblit
    • It can be used as a dummy warehouse view, without administrative control and user accounts.
    • It can be used as a complete git service with cloning, push, and warehouse access control.
    • It can be used independently of other git tools, including actual git, and it works with the tools you already have.
1. Create the Gitblit installation directory

First we will set up a directory on our server and install the latest gitblit in this directory.

    1. $ sudo mkdir -p /opt/gitblit
    2. $ cd /opt/gitblit

2. Download and Unzip

We will now download the latest version of Gitblit from the Gitblit official site. Here we will install version 1.6.2. Therefore, the command should be modified according to the specific version at the time of installation.

    1. $ sudo wget http://dl.bintray.com/gitblit/releases/gitblit-1.6.2.tar.gz

Next, we unzip the downloaded tar package to the previously created directory/opt/gitblit/

    1. $ sudo tar -zxvf gitblit-1.6.2.tar.gz

3. Configure and run

Now, we'll configure the Gitblit. If you want to customize the behavior of Gitblit, you can modify it gitblit/data/gitblit.properties . After the configuration is complete, we will run the installed Gitblit. There are two ways to run Gitblit, the first of which is to run manually with the following command:

    1. $ sudo java -jar gitblit.jar --baseFolder data

The other is to add gitblit as a service. Here are the steps to add gitblit as a service under Linux.

Since I am using Ubuntu, the following command will be the sudo cp service-ubuntu.sh/etc/init.d/gitblit, so please modify the file name according to your release service-ubuntu.sh to the corresponding release version of your run.

    1. $ sudo ./install-service-ubuntu.sh
    2. $ sudo service gitblit start

Open in your browser http://localhost:8080 or, you https://localhost:8443 can also replace localhost with an IP address based on your local configuration. Enter the default administrator credentials: Admin/admin and click the login button.

Now, we will add a new user. First, you need to login with Admin user, username = Admin, password =admin.

Then, click the user icon > Users > (+) New user to create a new users, as shown in.

Now we will create a warehouse that is available out of the box. Click Repositories > (+) New repository. Then, add the new warehouse as shown.

Create a new warehouse using the command line
    1. touch README.md
    2. git init
    3. git add README.md
    4. git commit -m "first commit"
    5. git remote add origin ssh://[email protected]:29418/linoxide.com.git
    6. git push -u origin master

Replace the user name arunlinoxide with the user name you added.

To push an existing warehouse on the command line
    1. git remote add origin ssh://[email protected]:29418/linoxide.com.git
    2. git push -u origin master

Note : It is strongly recommended that everyone modify the username "admin" password.

Gitblit-git Version Server Environment deployment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.