User Tools

This is an old revision of the document!


GITea

GITEA is a nice web gui for GIT. It is actually much more and allows for GIT fine tuning of remote rpeositories and access control. It can be used to version-control any kind of sources, including text documents and scripts.

Installing is easy:

 > echo ">=acct-user/git-0-r3 gitea" >> /etc/portage/package.use/gitea
 > emerge -v gitea

Then you want to move repos and data and config to your RAID drive:

 > usermod -d /data/daemons/gitea -m gitea

Adapt default config, edit /etc/conf.d/gitea:

GITEA_CONF="/data/daemons/gitea/app.ini"
GITEA_WORK_DIR="/data/daemons/gitea"

and also edit your /data/daemons/gitea/app.ini: <code> BASE_URL = https://your external url/gitea/ HTTP_ADDR = 127.0.0.1 HTTP_PORT = 3001 </code> And setup NGINX reverse proxy by adding /etc/nginx/folders/gitea.conf**:

  location /gitea/ {
        client_max_body_size 512M;
 
        # make nginx use unescaped URI, keep "%2F" as is
        rewrite ^ $request_uri;
        rewrite ^/gitea(/.*) $1 break;
        proxy_pass http://127.0.0.1:3001$uri;
 
        proxy_set_header Connection $http_connection;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

Now your remote URLs are in the following format:

 For SSH urls: ssh://git@server:ssh_port/user/repo.git

This website uses technical cookies only. No information is shared with anybody or used in any way but provide the website in your browser.

More information