Git with a cup of tea, painless self-hosted git service

Overview

Gitea

Gitea - Git with a cup of tea

View the chinese version of this document

Purpose

The goal of this project is to make the easiest, fastest, and most painless way of setting up a self-hosted Git service. Using Go, this can be done with an independent binary distribution across all platforms which Go supports, including Linux, macOS, and Windows on x86, amd64, ARM and PowerPC architectures. Want to try it before doing anything else? Do it with the online demo! This project has been forked from Gogs since 2016.11 but changed a lot.

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 1.13 or greater.
  • make frontend which requires Node.js 10.13 or greater.

If pre-built frontend files are present it is possible to only build the backend:

TAGS="bindata" make backend

Parallelism is not supported for these targets, so please don't include -j <num>.

More info: https://docs.gitea.io/en-us/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

NOTES:

  1. YOU MUST READ THE CONTRIBUTORS GUIDE BEFORE STARTING TO WORK ON A PULL REQUEST.
  2. If you have found a vulnerability in the project, please write privately to [email protected]. Thanks!

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 hugo-based documentation theme is hosted at gitea/theme.
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!

Dashboard User Profile Global Issues
Branches Web Editor Activity
New Migration Migrating Pull Request View
Pull Request Dark Diff Review Dark Diff Dark
Issues
  • Kanban board

    Kanban board

    Fixes https://github.com/go-gitea/gitea/issues/3476

    • [x] Move Issues between Boards
    • [x] add Project to current Issue
    • [x] view project
    • [x] create a project
    • [x] create Issue during viewing project
    • [x] select project during create Issue
    • [x] add Board to an existing Project
    • [x] delete Board from a project
    • [x] rename Board title
    • [x] Individual boards
    • [x] Organization boards
    • [x] Repository boards

    Definitely another PR:

    • [ ] Location of cards in the project board. Right now, cards location in a board cannot be persisted - i.e move card X above card Y in the same board.

    @rudineirk UI suggestion ( from https://github.com/go-gitea/gitea/issues/3476#issuecomment-416950682 ) was used.

    Screen Shot 2020-03-17 at 23 31 20 Screen Shot 2020-03-17 at 23 31 41 Screen Shot 2020-03-17 at 23 31 51

    image

    image

    kind/feature lgtm/need 1 changelog 
    opened by adelowo 233
  • Support unicode emojis and remove emojify.js

    Support unicode emojis and remove emojify.js

    This PR replaces all use of emojify.js and adds unicode emoji support to various areas of gitea.

    This works in a few ways:

    First it adds emoji parsing support into gitea itself. This allows us to

    • Render emojis from valid alias (:smile:)
    • Detect unicode emojis and let us put them in their own class with proper aria-labels and styling
    • Easily allow for custom "emoji"
    • Support all emoji rendering and features without javascript
    • Uses plain unicode and lets the system render in appropriate emoji font
    • Doesn't leave us relying on external sources for updates/fixes/features

    That same list of emoji is also used to create a json file which replaces the part of emojify.js that populates the emoji search tribute.

    For custom "emoji" it uses a pretty simple scheme of just looking for /emojis/img/name.png where name is something a user has put in the "allowed reactions" setting we already have. The gitea reaction that was previously hard coded into a forked copy of emojify.js is included and works as a custom reaction under this method.

    The emoji data sourced here is from https://github.com/github/gemoji which is the gem library Github uses for their emoji rendering (and a data source for other sites). So we should be able to easily render any emoji and :alias: that Github can, removing any errors from migrated content. They also update it as well, so we can sync when there are new unicode emoji lists released.

    I've included a slimmed down and slightly modified forked copy of https://github.com/knq/emoji to make up our own emoji module. The code is pretty straight forward and again allows us to have a lot of flexibility in what happens.

    I had seen a few comments about performance in some of the other threads if we render this ourselves, but there doesn't seem to be any issue here. In a test it can parse, convert, and render 1,000 emojis inside of a large markdown table in about 100ms on my laptop (which is many more emojis than will ever be in any normal issue). This also prevents any flickering and other weirdness from using javascript to render some things while using go for others.

    Includes the optional download of a fallback emoji webfont for small number of users who don't already have one installed.

    Fixes: https://github.com/go-gitea/gitea/issues/9182 Fixes: https://github.com/go-gitea/gitea/issues/8974 Fixes: https://github.com/go-gitea/gitea/issues/8953 Fixes: https://github.com/go-gitea/gitea/issues/6628 Fixes: https://github.com/go-gitea/gitea/issues/5130

    kind/enhancement kind/ui lgtm/done kind/build 
    opened by mrsdizzie 138
  • Enable race detector for CI

    Enable race detector for CI

    close #1430

    lgtm/done kind/testing kind/upstream-related 
    opened by typeless 115
  • Provide releases and deb/rpm packages via Bintray

    Provide releases and deb/rpm packages via Bintray

    I would like to integrate a proper process to create real system packages and distribute them via Bintray, than users can just add a deb/rpm repository and got a clean upgrade path.

    Beside that we can also publish our releases to a static page or also to Bintray for download.

    kind/deployment kind/build reviewed/confirmed 
    opened by tboerger 113
  • OAuth2 auto-register

    OAuth2 auto-register

    Changes

    • Refactored user creation (code deduplication, see individual commit messages: a3366c4 and 6e2ece4)
    • Added auto-registration for OAuth2 users

    Settings

    A new settings section (oauth2_client) is added and documented in custom/conf/app.ini.sample and content/doc/advanced/config-cheat-sheet.en-us.md.

    Breaking changes?

    No. The default settings reflect the current behaviour. And OAuth2 auto-register needs to be manually enabled.

    Referenced Issues

    Implements #3520 und solves the secondary consideration in #1036.

    kind/feature lgtm/done changelog reviewed/confirmed 
    opened by mgjm 110
  • Added dependencies for issues (#2196)

    Added dependencies for issues (#2196)

    Introduction

    This PR implements dependencies for issues, as described in #2196.

    It lets you define anonther issue as a dependency for an issue. You the cannot close the issue if it has any dependent issues which aren't closed. If you try to autoclose an issue via commit message which still has dependencies left, autoclose will simply not close the issue, but the commit will not fail.

    You can disable dependencies in the repo settings.

    Example: You set #2, #3 and #4 as a dependency of #1. Now you need to close all #2, #3 and #4, before you can close #1.

    Screenshots

    Overview of Issue Dependencies (sidebar): Overview of Issue Dependencies (sidebar):

    Comments after adding a new dependency: Comments after adding a new dependency

    Questions

    Currently, i would describe this as "working, but not finished", as there are some questions i have:

    1. For now, you need the issue ID (not the index) to create a dependency. This is not very user-friendly, I'd like to have some kind of search bar where you search for the issue title/index select it, and it'll do the rest. Problem: There is no API-Endpoint to search for issues like that (Or just returns a list of all issues as JSON). I think this should be implemented first. If such thing already exists, please point me to it, I haven't found any.
    2. It is currently possible to create dependencies with issues from other repositories. Is this okay? Or should one not be able to do this, as it could create a massive overhead with all permission-checking etc.
    3. There is some work to be done with migrations etc, currently i simply put the xorm-call at the beginning of the function, which probably shouldn't be there. Where is the appropriate place to put this?

    This is my first time I've done something like this in Go, before i've only played around with Go but never really did anything bigger. So, there are probably some things I didn't got right as a novice. Looking forward to hear your improvents to be made! Also thanks to @JonasFranzDEV who has helped me a lot.

    kind/feature lgtm/done changelog 
    opened by kolaente 103
  • Screenreaders unable to read Gitea's various dropdowns

    Screenreaders unable to read Gitea's various dropdowns

    • Gitea version (or commit ref): 1.8.1

    • Git version: 2.21.0

    • Operating system: windows10-1903

    • Database (use [x]):

      • [ ] PostgreSQL
      • [x] MySQL
      • [ ] MSSQL
      • [x] SQLite
    • Can you reproduce the bug at https://try.gitea.io:

      • [ ] Yes (provide example URL)
      • [ ] No
      • [x] Not relevant
    • Log gist: not needed

    Description

    Gitea, as with gogs which it was forked from, has many accessibility issues with screen readers including:

    1. The dropdown menus are clickables, so many screen readers do not know what to do with them as they do not use the mouse cursor.
    2. The license selection/.gitignore selection (and most other menus of that type) are inaccessible, as they all use mouse oriented actions.
    3. Possibly others I haven't seen yet.

    Unfortunately, this is caused by the toolkit you use, which does not seem interested in making their toolkit accessible. It can be worked around with aria markup, or by changing toolkits (the first of which is easier to begin with but requires more maintenance over time, the second of which is of course much harder, but once you get it done it's done pretty much forever).

    See the original issue on gogs for more info: gogs/gogs#3340

    Looking forward to seeing if anything can be done about this. -dingpengyu. tests screen reader: NVDA thank

    kind/proposal 
    opened by xingkong0113 91
  • Slow repository browsing in 1.14.x

    Slow repository browsing in 1.14.x

    • Gitea version (or commit ref): 1.14.x
    • Git version: 2.31.1
    • Operating system: FreeBSD 13
    • Gitea built using ports collection (www/gitea)
    • Gitea started by startup script provided by www/gitea port
    • Database (use [x]):
      • [x] PostgreSQL 12.6
      • [ ] MySQL
      • [ ] MSSQL
      • [ ] SQLite
    • Can you reproduce the bug at https://try.gitea.io:
      • [x] Yes (https://try.gitea.io/tsowa/FreeBSD_ports)
      • [ ] No
    • Log gist: https://www.ttmath.org/gitea.log

    Description

    I saw a similar thread but there is "windows" in the title so I create a new issue. Gitea 1.14.x is much slower in repository browsing than Gitea 1.13.

    Sample repo running with 1.14.1: https://gitea.ttmath.org/FreeBSD/ports Try to open any directory, for example: https://gitea.ttmath.org/FreeBSD/ports/src/branch/main/audio It takes between 50-150 seconds to open a page.

    The same repo running with 1.13.7: https://giteaold.ttmath.org/FreeBSD/ports Try to open similar directory, for example: https://giteaold.ttmath.org/FreeBSD/ports/src/branch/main/audio I takes about 5 seconds.

    You can see the same problem on try.gitea.io: https://try.gitea.io/tsowa/FreeBSD_ports But you have a cache so you have to find a directory which was not open before. Opening such a page takes 100-300 seconds.

    Let me know if more info is needed.

    performance/speed performance/bigrepo 
    opened by tsowa 87
  • Pastebin service

    Pastebin service

    • Gitea version (or commit ref): all
    • Git version: all
    • Operating system: all
    • Database (use [x]):
      • [x] PostgreSQL
      • [x] MySQL
      • [x] SQLite
    • Can you reproduce the bug at https://try.gitea.io:
      • [x] Yes (provide example URL)
      • [ ] No
      • [x] Not relevant

    Description

    I am used to Gist, the pastebin service, since it offers me the option to collect all my pasted code in one central place and that in the same interface, text editor and so on, which i use on Github, so all is very consistent.

    I suggest to implement such a service for Gitea too, as Gitlab does it with their snippets.

    This is something we all use, it provides users and developers the very same look and feel as in Gitea, is easy to implement (so far i as a newbie can see) and offer us a history of all the already posted code.


    Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

    kind/proposal 
    opened by ShalokShalom 86
  • Pushing to empty repository is not reflected in web UI

    Pushing to empty repository is not reflected in web UI

    • Gitea version (or commit ref): 1.10.2
    • Git version: 2.25.0
    • Operating system: ArchLinuxARM
    • Database (use [x]):
      • [ ] PostgreSQL
      • [ ] MySQL
      • [ ] MSSQL
      • [x] SQLite
    • Can you reproduce the bug at https://try.gitea.io:
      • [ ] Yes (provide example URL)
      • [x] No: https://try.gitea.io/mxt92822/empty_test
      • [ ] Not relevant
    • Log gist: https://gist.github.com/kauron/136587e6abf7611481d7461000eb8c4d

    Description

    Exactly the same as in #9365, but the filesystem is mounted with exec. I think the localhost API calls are the hooks, but I'm not sure. The hooks in the repo run properly when executed manually through the terminal.

    (description copied from the previously mentioned issue)

    I created a new repo and pushed a local repository. I tried it both with --all (it has two branches) and without (pushed only master). Either way the repository is not changed to non-empty. I did it manually in the DB to set the is_empty column to 0 which fixed the problem.

    opened by kauron 84
  • Submitting a new issue gives 500 error

    Submitting a new issue gives 500 error

    Gitea Version

    1.15.2

    Git Version

    2.16.5

    Operating System

    Linux RHEL 7.6

    How are you running Gitea?

    Downloaded the 64bit version binary Linux executable, and running it as a service.

    Database

    PostgreSQL

    Can you reproduce the bug on the Gitea demo site?

    No

    Log Gist

    2021/09/16 10:00:32 models/issue.go:1012:NewIssue() [I] [SQL] ROLLBACK [] - 40.9 49µs 2021/09/16 10:00:32 ...rs/web/repo/issue.go:980:NewIssuePost() [E] NewIssue: gen erate issue index failed: pq: syntax error at or near "ON"

    Description

    Updated from gitea 1.14.6 to 1.15.2. Now, creating a new issue in every repository gives a 500 error.

    Screenshots

    No response

    opened by artu72 0
  • Run `gitea dump-repo` from github's gitea repository failed.

    Run `gitea dump-repo` from github's gitea repository failed.

    Gitea Version

    1.16.0+dev-248-g45ebcb0d1

    Git Version

    2.27.0

    Operating System

    Linux

    How are you running Gitea?

    systemctl

    Database

    MySQL

    Can you reproduce the bug on the Gitea demo site?

    No

    Log Gist

    No response

    Description

    When run ./gitea dump from github's gitea repository, it returns the error.

    ...s/migrations/dump.go:473:CreatePullRequests() [E] AddRemote failed: exit status 1 - fatal: no path specified; see 'git help pull' for valid url syntax
            error: Could not fetch gabrielsimoes
    
    2021/09/16 06:00:24 protocol error: received *http.http2GoAwayFrame before a SETTINGS frame
    

    Screenshots

    No response

    opened by lunny 0
  • Notifications API: respond with updated notifications

    Notifications API: respond with updated notifications

    The 'mark notification as X' APIs previously had empty responses. This change makes them return the notifications affected by the request. fixes #16797

    kind/enhancement lgtm/need 2 kind/api 
    opened by noerw 1
  • Fix commit status index problem

    Fix commit status index problem

    Replace #14160 and fix #14059

    lgtm/need 2 
    opened by lunny 2
  • OpenAPI: correct documentation of issue listing parameters

    OpenAPI: correct documentation of issue listing parameters

    Parameter documentation for GET /repos/{owner}/{repo}/issues was poor, I improved it.

    (If you by chance know of other OpenAPI docstrings that need correction / improvement, lmk, I can add changes here while at it)

    kind/docs lgtm/done kind/api skip-changelog 
    opened by noerw 1
  • Link to attachement via copy & paste not correct

    Link to attachement via copy & paste not correct

    • Gitea version (or commit ref): 1.15.2
    • Git version: 2.17.1
    • Operating system: Linux
      • Downloaded gitea from binary (https://dl.gitea.io/gitea/1.15.2/gitea-1.15.2-linux-amd64.xz)
      • Running as systemd service
      • Distro: Ubuntu Server 18.04.5 LTS
    • Database:
      • [x] SQLite
    • Can you reproduce the bug at https://try.gitea.io:
      • [x] No
    • Log gist:

    Description

    I'm working on a Windows PC. While creating an issue or creating/editing a comment I like to add screenshots. I copy the image file by selecting it in the file explorer, press "Ctrl + c" on keyboard, change to Windows Edge where I am creating the comment, press "Ctrl + v" after the cursor is in the location where I want the image.

    The image gets added as and the link is added after file upload completes. When selecting preview the image does not get displayed but I see a "broken image link" pictogram.

    I have noticed that I need to edit the automatically generated link from /gitea/attachments/<image_id> to /attachments/<image_id> and then I get the image preview.

    Images added in older comments/issues are currently displayed with the "broken image link" pictogram. It seems that there have been some changes to how the links are being created.

    Hosting environment

    We are using an apache as reverse proxy for http to https redirect.

    The gitea base-URL is configured as: https://<hostname>/gitea/

    Screenshots

    image

    image

    opened by nsolthe 2
  • Add filter option for subscribed issues

    Add filter option for subscribed issues

    This pull request adds a filter option "subscribed" to the /issues overview and to the lists in in the repos (and to the API). Addresses https://github.com/go-gitea/gitea/issues/16111 (and closes the first part of it).

    I know that the SQL command here is a very long and complex SQL command, but I didn't find another working way (I don't know enough about these xorm.Session conditions) and it works. The command just filters the issues if they are in the issue_watch table and is_watching is 1 or if they are in the comment table but not in the list of issues in issue_watch where is_watching is 0 or if they are in the issues table but not in the list of issues in issue_watch where is_watching is 0. If you know another way how to make this more readable, it would be nice if you could comment.

    kind/enhancement 
    opened by qwerty287 0
  • Upgrade xorm to fix rows bug

    Upgrade xorm to fix rows bug

    Fix #17030

    kind/bug lgtm/done backport/done backport/v1.15 
    opened by lunny 2
  • Use light/dark theme based on system preference

    Use light/dark theme based on system preference

    Add a new default theme auto, which will automatically switch between gitea (light) and arc-green (dark) themes depending on the user's operating system settings.

    Closes: go-gitea#8183

    kind/enhancement kind/ui lgtm/need 2 
    opened by gwymor 6
  • Nicely handle missing user in collaborations

    Nicely handle missing user in collaborations

    It is possible to have a collaboration in a repository which refers to a no-longer existing user. This causes the repository transfer to fail with an unusual error.

    This PR makes repo.getCollaborators() nicely handle the missing user by ghosting the collaboration but also adds consistency check. It also adds an Access consistency check.

    Fix #17044

    Signed-off-by: Andrew Thornton [email protected]

    kind/bug lgtm/need 1 backport/v1.15 
    opened by zeripath 1
Releases(v1.15.2)
Owner
Gitea
Git with a cup of tea
Gitea
A Simple and Comprehensive Vulnerability Scanner for Container Images, Git Repositories and Filesystems. Suitable for CI

A Simple and Comprehensive Vulnerability Scanner for Containers and other Artifacts, Suitable for CI. Table of Contents Abstract Features Installation

Aqua Security 8.6k Sep 22, 2021
A curated list of awesome Kubernetes tools and resources.

Awesome Kubernetes Resources A curated list of awesome Kubernetes tools and resources. Inspired by awesome list and donnemartin/awesome-aws. The Fiery

Tom Huang 881 Sep 22, 2021
GitHub中文排行榜,帮助你发现高分优秀中文项目、更高效地吸收国人的优秀经验成果;榜单每周更新一次,敬请关注!

榜单设立目的 ???? GitHub中文排行榜,帮助你发现高分优秀中文项目; 各位开发者伙伴可以更高效地吸收国人的优秀经验、成果; 中文项目只能满足阶段性的需求,想要有进一步提升,还请多花时间学习高分神级英文项目; 榜单设立范围 设立1个总榜(所有语言项目汇总排名)、18个分榜(单个语言项目排名);

kon9chunkit 38.7k Sep 23, 2021
Simplified network and services for edge applications

English | 简体中文 EdgeMesh Introduction EdgeMesh is a part of KubeEdge, and provides a simple network solution for the inter-communications between servi

KubeEdge 56 Sep 19, 2021
Lightweight, CRD based envoy control plane for kubernetes

Lighweight, CRD based Envoy control plane for Kubernetes: Implemented as a Kubernetes Operator Deploy and manage an Envoy xDS server using the Discove

null 36 Sep 18, 2021
Test and benchmark KPHP code

Overview ktest is a tool that makes kphp programs easier to test. ktest phpunit can run PHPUnit tests using KPHP ktest bench run benchmarks using KPHP

VK.com 7 Sep 14, 2021
Enterprise-grade container platform tailored for multicloud and multi-cluster management

KubeSphere Container Platform What is KubeSphere English | 中文 KubeSphere is a distributed operating system providing cloud native stack with Kubernete

KubeSphere 6.8k Sep 19, 2021
Hassle-free minimal CI/CD for git repositories with docker or docker-compose projects.

GIT-PIPE Hassle-free minimal CI/CD for git repos for docker-based projects. Features: zero configuration for repos by default automatic encrypted back

Aleksandr Baryshnikov 50 Sep 16, 2021
🐻 The Universal Service Mesh. CNCF Sandbox Project.

Kuma is a modern Envoy-based service mesh that can run on every cloud, in a single or multi-zone capacity, across both Kubernetes and VMs. Thanks to i

Kuma 2.4k Sep 24, 2021
Open Service Mesh (OSM) is a lightweight, extensible, cloud native service mesh that allows users to uniformly manage, secure, and get out-of-the-box observability features for highly dynamic microservice environments.

Open Service Mesh (OSM) Open Service Mesh (OSM) is a lightweight, extensible, Cloud Native service mesh that allows users to uniformly manage, secure,

Open Service Mesh 2.1k Sep 16, 2021
The OCI Service Operator for Kubernetes (OSOK) makes it easy to connect and manage OCI services from a cloud native application running in a Kubernetes environment.

OCI Service Operator for Kubernetes Introduction The OCI Service Operator for Kubernetes (OSOK) makes it easy to create, manage, and connect to Oracle

Oracle 6 Sep 10, 2021
🐻 The Universal Service Mesh. CNCF Sandbox Project.

Kuma is a modern Envoy-based service mesh that can run on every cloud, in a single or multi-zone capacity, across both Kubernetes and VMs. Thanks to i

Kuma 2.3k Aug 10, 2021
Learning about containers and how they work by creating them the hard way

Containers the hard way: Gocker: A mini Docker written in Go It is a set of Linux's operating system primitives that provide the illusion of a contain

Shuveb Hussain 1.3k Sep 19, 2021
An advanced, yet simple, tunneling/pivoting tool that uses a TUN interface.

Ligolo-ng : Tunneling like a VPN An advanced, yet simple, tunneling tool that uses a TUN interface. by TNP IT Security Table of Contents Introduction

TNP IT Security 192 Sep 20, 2021
🦥 Easy and simple Prometheus SLO generator

Sloth Introduction Use the easiest way to generate SLOs for Prometheus. Sloth generates understandable, uniform and reliable Prometheus SLOs for any k

Xabier Larrakoetxea Gallego 674 Sep 19, 2021
Small and easy server for web-hooks to deploy software on push from gitlab/github/hg and so on

Deployment mini-service This mini web-server is made to deploy your code without yaml-files headache. If you just need to update your code somewhere a

Roman Usachev 9 Aug 31, 2021
Hubble - Network, Service & Security Observability for Kubernetes using eBPF

Network, Service & Security Observability for Kubernetes What is Hubble? Getting Started Features Service Dependency Graph Metrics & Monitoring Flow V

Cilium 1.6k Sep 15, 2021
LinkPage is a FOSS self-hosted alternative to link listing websites such as LinkTree and Campsite.bio

LinkPage LinkPage is a FOSS self-hosted alternative to link listing websites such as LinkTree and Campsite.bio Features Self hostable and open source

Rohan Verma 31 Sep 2, 2021
An application-oriented unified storage layer for Golang.

storage An application-oriented unified storage layer for Golang. Goal Production ready High performance Vendor agnostic Features Widely services supp

Application Oriented Storage 251 Sep 22, 2021