Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to use Gogs to build your own Git server

Shulou Source: shulou.com Published: 2022-05-31 20:26:46 09月22日 Update

This article will explain in detail how to use Gogs to build your own Git server. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

Background

As we all know, people like Ma Yun and GitHub are remote repositories for hosting open source code for free. But for the company, not only do not want to release the source code, but also reluctant to pay protection fees, they can only build their own Git server to use as a private warehouse.

Here's how to use gogs to build your own git server.

Official website: https://gogs.io/

Installation steps

1. Download git for windows

Https://github.com/git-for-windows/git/releases/download/v2.15.0.windows.1/Git-2.15.0-64-bit.exe

2. Download NSSM:

Https://nssm.cc/release/nssm-2.24.zip

3. Download the installation package

Https://dl.gogs.io/0.12.3/gogs_0.12.3_windows_amd64.zip

4. Install git for windows

5. Install NSSM

Set system variables: control Panel-- > system and Security-- > system-- > Advanced system Settings-- > Environment variables-- > system variables-- > Edit system variables add the NSSM file path "D:\ conanl\ Downloads\ nssm-2.24\ nssm-2.24\ win64" to the variable value project. The actual configuration of the path placement.

6. Install gogs

6.1. Edit the system installation file:

D:\ conanl\ Downloads\ gogs_0.12.3_windows_amd64\ gogs\ scripts\ windows\ install-as-service.bat

Modify the following items:

SETgogspath=D:\ conanl\ Downloads\ gogs_0.12.3_windows_amd64\ gogs (modified according to the actual installation directory)

6.2. Run the installation script with administrative privileges:

Browser input: http://127.0.0.1:3000/

Achieve the desired results; then you can register an account. The default administrator account and password is the first account you register, that is, after the installation, your first account is the administrator, and it also has the function of a normal account.

On how to use Gogs to build their own Git server to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: System account server service variable that is management warehouse content actual file article more knowledge administrator article path project good ordinary Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Shulou Tech Info OPPO Reno MySQL vpn