Skip to content

Instantly share code, notes, and snippets.

@agborkowski
Forked from appleboy/gitea_install.md
Last active March 16, 2018 13:52
Show Gist options
  • Save agborkowski/d5d0773788c27efacbef01c65200b247 to your computer and use it in GitHub Desktop.
Save agborkowski/d5d0773788c27efacbef01c65200b247 to your computer and use it in GitHub Desktop.
how to install gitea in Ubuntu/Debian.

Gitea

Gitea is a painless self-hosted Git service. It is similar to GitHub, Bitbucket or Gitlab. The initial development have been done on Gogs but we have forked it and named it Gitea. If you want to read more about the reasons why we have done that please read this blog post.

Run Gitea service

Download Gitea binary from download page first.

$ wget https://dl.gitea.io/gitea/1.4/gitea-1.4-linux-amd64 -O gitea
$ chmod +x gitea

Add git user

$ useradd -m git
$ cp gitea /home/git/

Run gitea command as git user. default port is 3000.

$ su - git
$ ./gitea web

Run Caddy service

Download Caddy binary from github release page.

$ wget https://github.com/mholt/caddy/releases/download/v0.9.5/caddy_linux_amd64.tar.gz -O caddy.tar.gz
$ mkdir caddy && tar -zxvf caddy.tar.gz -C caddy

Create caddy config file with name as Caddyfile and add the following config.

example.com {
  proxy / 127.0.0.1:3000
}

Update Gitea config file custom/conf/app.ini.

[server]
SSH_DOMAIN       = example.com
HTTP_PORT        = 3000
ROOT_URL         = https://example.com

Integrate with Jenkins

Install Jenkins Gitea Webhook Plugin.

Open your browser

https://example.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment