Using Gogs to build a git server

Source: Internet
Author: User
Tags ssh server

Git has basically replaced SVN as the main source of code management tools, I used git for source management in the previous article--git managed Services introduced a number of domestic and foreign mainstream online git services, although these online git services are mostly very useful, But sometimes we also need to build their own git server, such as the enterprise internal source control or personal private source management.

Before the company used Gitlab to build a git server, Gitlab itself is very useful, but in some lightweight applications (such as human source Management Server) scenario, the construction and use of the process is somewhat complicated. Today I'm here to introduce you to another easy-to-use Git server gogs.

Gogs is a git server written in the go language that can run on any go language-supported platform, including Windows, Mac, Linux, and ARM. It's basically a cross-platform server. For example, I usually work on the Windows platform most of the time, if you want to put some of my local code management, if you want to use Gitlab, when using a virtual machine, it seems very troublesome. Here I'll show you how to install and use Gogs to build a git server on the Windows platform.

From the official website installation instructions, it needs the following environment:

    1. Database, support Mysql,postgresql, or install nothing (SQLite or TIDB can be selected at this time)
    2. Git (Bash)
    3. SSH server, if only HTTP can not be installed

As you can see, if the most streamlined installation, just follow the git bash below. Because Git was installed on my computer before, it was installed on the Windows platform basically all the way down, and this is not covered here.

After the basic environment is ready, first to download its installation package, for simplicity, here I directly download the binary installation package. After extracting, you can see a gogs.exe file. Start it using the Startup parameters Web:

???? Gogs Web

You can see the following screen:

Then, according to the prompt information, start the browser, enter http://localhost:3000, you can see the installation interface:

Here I do not install any database, so the choice is SQLite, most of the other is basically optional, must fill in basically have been filled, for individual users, basically directly click "Install Now" can. I have changed the path of the warehouse here, the others have not changed. This is already installed and can be used directly. You can use it directly by registering your account.

The installation method is very simple, basically one step can be done. If you need more advanced configuration, see the official note: Configure and run.

In this way, every boot to execute the "gogs Web" command, shut down the EXE server immediately stop, for individual users this way is very convenient, because git is not very dependent on the network, often just need pull or push to need, The service can be turned on at this time, closed after use, do not occupy resources.

However, sometimes we want the GIT server to be long-running (such as a code server within a small team), and it's easy to accidentally turn it off with the Windows console program. In general, when the team is used for a long time, it is more appropriate to deploy it on a Linux system, and if it is not to be deployed on Windows, it can be encapsulated as a service through programs such as MINIWINSVC, and this method is an article introduced by the authorities.

Using Gogs to build a git server

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.