Install a git repository without root permission with Gitea in rhel/centos/debian/ubuntu

Merouane Agar
2 min readJan 12, 2021

Gitea is a community managed fork of Gogs, lightweight code hosting solution written in Go and published under the MIT license

1> Download a last release of Gitea
go to https://dl.gitea.io/gitea , and download the binary to the current release

Prepare your tree structure

[user1@centos7 ~]$ mkdir -p ~/gitea/{bin,etc,repo}

copy and rename gitea-1.13.1-linux-amd64 on ~/gitea/bin/gitea

[user1@centos7 ~]$ cp /tmp/gitea-1.13.1-linux-amd64 ~/gitea/bin/gitea && chmod +x ~/gitea/bin/gitea

Start gitea

[user1@centos7 ~]$ GITEA_WORK_DIR=~/gitea/ ~/gitea/bin/gitea web -c ~/gitea/etc/app.ini
2021/01/12 13:39:30 cmd/web.go:108:runWeb() [I] Starting Gitea on PID: 4506
2021/01/12 13:39:30 ...s/setting/setting.go:504:NewContext() [W]
............Starting new server: tcp:0.0.0.0:3000 on PID: 4506

Configure gitea : go to in yor url http://IpAddress:3000/install

Configuring Gitea

Database Type : SQLite3
Path : /home/user1/gitea/data/gitea.db
Site Title : Myrepogit
Repository Root Path : /home/user1/gitea/repo
Git LFS Root Path : /home/user1/gitea/data/lfs
Run As Username : user1
SSH Server Domain : localhost
SSH Server Port : 22
Gitea HTTP Listen Port : 3000
Gitea Base URL : http://IpAddress:3000/
Log Path : /home/user1/gitea/log

You can now create the first account which will automatically be the site administrator

Create your first repo

--

--