gitea
Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
Top Related Projects
Quick Overview
Gitea is a lightweight, self-hosted Git service written in Go. It's designed to be a painless, fast, and easy-to-install alternative to other popular Git hosting solutions. Gitea aims to provide a complete collaborative development platform with features similar to GitHub, GitLab, and Bitbucket.
Pros
- Easy to install and maintain, with low system requirements
- Fast performance due to its Go implementation
- Highly customizable with a wide range of configuration options
- Active community and regular updates
Cons
- Fewer advanced features compared to larger platforms like GitHub or GitLab
- Limited ecosystem of third-party integrations
- Some users report occasional UI/UX inconsistencies
Getting Started
To get started with Gitea, follow these steps:
-
Download the latest Gitea binary for your platform from the official releases page.
-
Create a new user and group for Gitea:
sudo adduser --system --group --disabled-password --shell /bin/bash --home /home/git --gecos 'Git Version Control' git
- Create necessary directories:
sudo mkdir -p /var/lib/gitea/{custom,data,log}
sudo chown -R git:git /var/lib/gitea/
sudo chmod -R 750 /var/lib/gitea/
sudo mkdir /etc/gitea
sudo chown root:git /etc/gitea
sudo chmod 770 /etc/gitea
- Copy the Gitea binary to a system-wide location:
sudo cp gitea /usr/local/bin/gitea
- Create a systemd service file for Gitea:
sudo nano /etc/systemd/system/gitea.service
Add the following content:
[Unit]
Description=Gitea (Git with a cup of tea)
After=syslog.target
After=network.target
[Service]
RestartSec=2s
Type=simple
User=git
Group=git
WorkingDirectory=/var/lib/gitea/
ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
Restart=always
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea
[Install]
WantedBy=multi-user.target
- Start and enable the Gitea service:
sudo systemctl enable gitea
sudo systemctl start gitea
- Access Gitea through your web browser at
http://localhost:3000
and complete the initial setup.
Competitor Comparisons
Gogs is a painless self-hosted Git service
Pros of Gogs
- Lighter resource footprint, suitable for low-end hardware
- Simpler setup and configuration process
- Faster initial loading times
Cons of Gogs
- Less frequent updates and slower development pace
- Fewer advanced features and integrations
- Smaller community and ecosystem
Code Comparison
Gogs:
func (repo *Repository) GetCommit(commitID string) (*git.Commit, error) {
return repo.GitRepo.GetCommit(commitID)
}
Gitea:
func (repo *Repository) GetCommit(commitID string) (*git.Commit, error) {
return repo.gitRepo.GetCommit(commitID)
}
The code structures are similar, reflecting their common ancestry. However, Gitea's codebase has evolved more significantly over time, incorporating additional features and optimizations.
Both Gogs and Gitea are self-hosted Git service solutions written in Go. Gogs focuses on simplicity and lightweight operation, making it ideal for personal use or small teams with limited resources. Gitea, a fork of Gogs, has grown into a more feature-rich platform with a larger community and more frequent updates. It offers advanced functionality like built-in CI/CD, package registries, and enhanced user management, making it suitable for larger organizations and more complex workflows.
Git Server with CI/CD, Kanban, and Packages. Seamless integration. Unparalleled experience.
Pros of OneDev
- Built-in CI/CD functionality without relying on external services
- Advanced code intelligence features, including semantic search and navigation
- More modern UI with a focus on ease of use and productivity
Cons of OneDev
- Smaller community and ecosystem compared to Gitea
- Less extensive documentation and third-party integrations
- Written in Java, which may be less appealing to some developers
Code Comparison
Gitea (Go):
func (repo *Repository) GetCommit(id SHA1) (*Commit, error) {
c, err := repo.getCommit(id)
if err != nil {
return nil, err
}
return c, nil
}
OneDev (Java):
public Commit getCommit(ObjectId revisionId) {
try {
return new Commit(repository.parseCommit(revisionId));
} catch (IOException e) {
throw new RuntimeException(e);
}
}
Both repositories provide self-hosted Git management solutions, but they differ in their implementation and feature sets. Gitea focuses on being a lightweight, Go-based alternative to GitHub, while OneDev aims to provide a more comprehensive development platform with built-in CI/CD and advanced code intelligence features. The choice between the two depends on specific project requirements and team preferences.
A Git platform powered by Scala with easy installation, high extensibility & GitHub API compatibility
Pros of GitBucket
- Written in Scala, which may be preferred by some developers
- Simpler architecture, potentially easier to understand and modify
- Lightweight and can run as a standalone application
Cons of GitBucket
- Smaller community and fewer contributors compared to Gitea
- Less frequent updates and slower feature development
- Limited built-in CI/CD integration options
Code Comparison
Gitea (Go):
func (repo *Repository) GetOwner() (err error) {
if repo.Owner != nil {
return nil
}
repo.Owner, err = GetUserByID(repo.OwnerID)
return err
}
GitBucket (Scala):
def getOwner(repository: RepositoryInfo)(implicit s: Session): Account = {
getAccountByUserName(repository.owner).get
}
Both projects aim to provide self-hosted Git services, but Gitea has gained more popularity and has a larger community. Gitea is written in Go, which offers better performance and easier deployment. It also provides more features out-of-the-box, including built-in CI/CD, issue tracking, and project management tools.
GitBucket, on the other hand, offers a simpler architecture and can be a good choice for smaller teams or those familiar with Scala. However, it may lack some advanced features and integrations compared to Gitea.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Gitea
Purpose
The goal of this project is to make the easiest, fastest, and most painless way of setting up a self-hosted Git service.
As Gitea is written in Go, it works across all the platforms and architectures that are supported by Go, including Linux, macOS, and Windows on x86, amd64, ARM and PowerPC architectures. This project has been forked from Gogs since November of 2016, but a lot has changed.
For online demonstrations, you can visit demo.gitea.com.
For accessing free Gitea service (with a limited number of repositories), you can visit gitea.com.
To quickly deploy your own dedicated Gitea instance on Gitea Cloud, you can start a free trial at cloud.gitea.com.
Building
From the root of the source tree, run:
TAGS="bindata" make build
or if SQLite support is required:
TAGS="bindata sqlite sqlite_unlock_notify" make build
The build
target is split into two sub-targets:
make backend
which requires Go Stable, the required version is defined in go.mod.make frontend
which requires Node.js LTS or greater.
Internet connectivity is required to download the go and npm modules. When building from the official source tarballs which include pre-built frontend files, the frontend
target will not be triggered, making it possible to build without Node.js.
More info: https://docs.gitea.com/installation/install-from-source
Using
./gitea web
[!NOTE] If you're interested in using our APIs, we have experimental support with documentation.
Contributing
Expected workflow is: Fork -> Patch -> Push -> Pull Request
[!NOTE]
- YOU MUST READ THE CONTRIBUTORS GUIDE BEFORE STARTING TO WORK ON A PULL REQUEST.
- If you have found a vulnerability in the project, please write privately to security@gitea.io. Thanks!
Translating
Translations are done through Crowdin. If you want to translate to a new language ask one of the managers in the Crowdin project to add a new language there.
You can also just create an issue for adding a language or ask on discord on the #translation channel. If you need context or find some translation issues, you can leave a comment on the string or ask on Discord. For general translation questions there is a section in the docs. Currently a bit empty but we hope to fill it as questions pop up.
https://docs.gitea.com/contributing/localization
Further information
For more information and instructions about how to install Gitea, please look at our documentation. If you have questions that are not covered by the documentation, you can get in contact with us on our Discord server or create a post in the discourse forum.
We maintain a list of Gitea-related projects at gitea/awesome-gitea.
The official Gitea CLI is developed at gitea/tea.
Authors
Backers
Thank you to all our backers! ð [Become a backer]
Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]
FAQ
How do you pronounce Gitea?
Gitea is pronounced /ɡɪâti:/ as in "gi-tea" with a hard g.
Why is this not hosted on a Gitea instance?
We're working on it.
License
This project is licensed under the MIT License. See the LICENSE file for the full license text.
Screenshots
Looking for an overview of the interface? Check it out!
Top Related Projects
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot