background

We all know that code cloud, GitHub is a remote repository that hosts open source code for free. However, for companies that do not want to disclose the source code and do not want to pay protection fees, they have to build a Git server as a private repository.

The following describes how to use Gogs to build your own Git server.

Liverpoolfc.tv: gogs. IO /

Installation steps

Git for Windows

Github.com/git-for-win…

2. Download NSSM:

https://nssm.cc/release/nssm-2.24.zip
Copy the code

3. Download the installation package

https://dl.gogs.io/0.12.3/gogs_0.12.3_windows_amd64.zip
Copy the code

Install Git for Windows

5. Install the 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” in the “Variable Values” item. Actual configuration of path placement.

6. Install gogs

6.1 Editing system installation files

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 (modify according to actual installation directory)

6.2 Run the installation script with administrative permission:

The effect

Enter http://127.0.0.1:3000/ in the browser

Achieve the desired effect; You can then register your account. The default administrator account and password is the first account you register, that is, after the completion of the installation your first account is the administrator, but also ordinary account function.