Using Gogs to build a private git Management Server

Source: Internet
Author: User
Tags sqlite database docker run
This is a creation in Article, where the information may have evolved or changed.

Using Gogs to build a private git Management Server

[TOC]

Because there are many procedures need to manage, the company, home, go out, a number of modified procedures need to copy to copy, it is easy to cause file mismatch, merger difficulties and other issues. So plan to build a version of the server, can upload and download their own programs anytime, especially some reluctant to open or immature code, easy to sync.

Why Choose Gogs?

The first important reason is that it is written in the Go language, the compiled executable does not need any other runtime to support, the direct copy can run without installation. And the Go language is a compiled type, and the execution is very efficient.
Secondly, Gogs is very consistent with my operating habits, it not only supports tools or commands to implement file upload and download, and so on, can also be edited online, or online to choose File Upload. Sometimes it is possible to modify the file directly outside of the computer without the installation tool, and the online editor is the same.
Finally, there is a major reason why it supports the SQLite database. Do not want to other Git server, must have MySQL and other databases, Occupy space and memory, SQLite is just a file, it is suitable for the ARM board such small memory with TF card to run the system board. Of course, Gogs also supports a variety of databases that I can't use.

The above is written by others, of course, the author itself has the above needs.

The simplest way to install and use--docker

Kitematic

The author is a windows 10 system and macOS High Sierra system for Kitematic managing Docker.

Start Docker, and open kitematic.

Search in the search bar gogs , the first one that appears is an official image. Please download and launch it directly.


After the download is complete, the image is automatically started. Do not enter the system first.

Open the settings and set the external storage address for data.


Once the address is modified, a restart occurs automatically.

Readers are invited to start using Gogs.

This should be the simplest way to implement it.

Command line

If you are a different Linux system, you can use the command line to install and start.

安装:sudo docker pull gogs/gogs启动:sudo docker run -d --name=mygogs -p 10022:22 -p 10080:3000 -v /var/gogs:/data gogs/gogs访问地址:http://192.168.126.174:10080/

Direct installation

Go Environment installation

For unsupported docker systems, you can choose to install directly in the GO environment.

If the reader computer already has an environment and is already configured, you can skip this step.

To access Https://golangtc.com/download, choose to download the latest Golang installation package according to the reader's own operating system. After downloading, install.

Specific installation of the GO environment methods and procedures, see the author of another article "Go Language Learning Series 001-Download Installation", here because of repetition, there is no one by one retelling.

Gogs Installation

Please refer to:

Https://gogs.io/docs/installation

Related Article

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.