introduce

Gitea is a cross-platform lightweight code hosting solution driven by the open source community. The backend is written in Go and is licensed under the MIT license. The project has been branching off from Gogs since 2016, but it has changed a lot. More motivation.

features

  • Support activity timeline
  • Supports SSH and HTTP/HTTPS
  • SMTP, LDAP, and reverse proxy user authentication are supported
  • Support for reverse proxy subpaths
  • Support user, organizational and warehouse management systems
  • Support for adding and removing warehouse collaborators
  • Support for warehouse and organization-level Web hooks (including Slack integration)
  • Support for repository Git hooks and deployment keys
  • Support for warehouse work orders, Pull requests, and wikis
  • Supports migration and mirroring of the repository and its Wiki
  • Support for online editing of repository files and wikis
  • Support custom source Gravatar and Federated Avatars
  • Support mail service
  • Supports the background management panel
  • Support for MySQL, PostgreSQL, SQLite3, MSSQL and TiDB (experimental support) databases
  • Support for multilingual localization (21 languages)

Set up steps

  • Local test environment (for other environments, please refer to the official website documentation) :

Operating system: Windows10 1903

Go version: V1.12.5 (if you just build, you don’t need to, Go environment is just for you to build yourself)

  • Installation steps:

1. Download the binaries from the official website

dl.gitea.io/

I downloaded version 1.8.2 here


2. Directly double-click the downloaded binary file to start


At this point we can open the browser http://127.0.0.1:3000/, and you will see the initial successful launch page


But we found a problem, since it is console, when the server is restarted, it will need to be opened manually, so we are going to register it as a Windows service. I offer two ways to register it as a Windows service

(1) See my previous article on how to register an executable as a Windows service tool, and it is visual

www.toutiao.com/i6685117283…

(2) The official document provides the Windows service registration method with Windows

First let’s rename the file to Gitea to make it easier for us

Step 1: Run CMD as administrator, then execute the following command (note your file location)

Step 2: After the service is created successfully, a message is displayed indicating that the service is created successfully. Then, start the service in Windows

If you want to delete the service, execute the following command

PS: If the restart fails, check whether the fault is caused by the database startup failure.

Step 3: Open our browser again, type in the address and the familiar page opens again


  • Initialize the

After the setup is successful, we need to initialize it. Click Register or Login in the upper right corner of the page to jump to the configuration page

This place needs to pay attention to the configuration of the database, I only have the Postgres database, so I took it to test, support the mainstream database, according to their own needs to choose. The database needs to first create an empty database, the name of their own custom, HERE is Gitea

Database Configuration


General configuration

Optional Settings (if not set by the administrator, the first user to register is the administrator)


After installation, it will automatically jump to the warehouse page


  • Create a warehouse


Here is the page that was created successfully

[Image upload failed…(image-9e35e6-1588237605134)]

The platform has been built successfully. For details or questions, please visit the official website to find the answers. Relevant addresses will be provided below.

PS: If you want to change the port (3000 by default) or other advanced configurations, please refer to the documentation or the following configuration cases

Github.com/go-gitea/gi…

The relevant address

Liverpoolfc.tv: gitea. IO/useful – cn /

Documents: the docs. Gitea. IO/useful – cn /

Presentation: the try. Gitea. IO /

Dl.gadea.io /

Github:github.com/go-gitea/gi…

conclusion

Gitea is an easy to set up self-service Git service, simple to set up with one click, no complex configuration, cross-platform support, fast running, beautiful interface, it is the enterprise or small team to set up independent Git code hosting service, hope this article share to help you, thank you for your support!