Skip to content

Instantly share code, notes, and snippets.

@calee0219
Forked from appleboy/gitea_install.md
Created August 8, 2017 02:48
Show Gist options
  • Save calee0219/456016fd3b2c683444fdb371d2c5dffb to your computer and use it in GitHub Desktop.
Save calee0219/456016fd3b2c683444fdb371d2c5dffb 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.1.0/gitea-1.1.0-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