How to create a git repository service using the Gitblit tool under Linux

Source: Internet
Author: User
Tags version control system

Hey! Friend, today we will learn 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.

$ sudo mkdir-p/opt/gitblit

$ 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.

$ 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/

$ 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 the 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:

$ 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.

$ sudo./install-service-ubuntu.sh

$ sudo service gitblit start

Open http://localhost:8080 or https://localhost:8443 in your browser, or you can 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 log in with the Admin user, username = Admin,password = admin.

Then, click on the user icon > Users > (+) New user to create a new users

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

Touch readme.md

Git init

git add readme.md

Git commit-m "First commit"

Git remote add Origin ssh://[email Protected]:29418/linoxide.com.git

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

Git remote add Origin ssh://[email Protected]:29418/linoxide.com.git

Git push-u Origin Master

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

Conclusion

Cheer it up! We have installed the latest version of Gitblit on the Linux computer. We will then be able to enjoy such a graceful version control system in our size project. With the Gitblit, version control is easier. It is easy to learn, lightweight, high-performance features.

Free pick up brother even it education original Linux OPS engineer video/Detailed Linux tutorials, details Inquiry official website customer Service: http://www.itxdl.cn/linux/

or hooking up with Q2430675018.

Welcome to the Linux Communication Group 478068715

How to create a git repository service using the Gitblit tool under Linux

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.