As we all know, code cloud and GitHub are remote repositories hosting open source code for free. But for the company, they don’t want to disclose the source code, and they don’t want to pay the protection fee, so they can only build a git server as a private warehouse.
The following describes how to use gogs to build your own git server.
Official website: https://gogs.io/
1. Download git for windows
2. Download NSSM:
3. Download installation package
4. Install git for windows
5. Installing NSSM
Set system variables: “control panel” – > “system and security” – > “system” – > “advanced system settings” – > “environment variables” – > “system variables” – > “edit system variables” in the “variable value” project, add the NSSM file path “D: (conanl, downloads, nssm-2.24, nssm-2.24, win64”. The actual configuration of path placement.
6. Install gogs
6.1. Edit system installation file:
Amend the following items:
SETgogspath=D:\conanl\Downloads\gogs_ 0.12.3_ windows_ AMD64 / gogs (modify according to the actual installation directory)
6.2. Run the installation script with administrative permission
Browser input: http://127.0.0.1:3000/
Achieve the desired effect; Then you can register your account. The default administrator account and password is the first account you register. That is, after the installation, your first account is the administrator. At the same time, it also has the function of ordinary account.