Gitea on freebsd

Hi anybody using gitea on freebsd? Do you know any good installation tutorials? I see it in packages and its reasonably current, but all I have found in terms of tutorials are jails based. I'm fine with the simple, non jails approach to getting it up and running. I don't want or need fancy, just functional.
 
The link bakul posted looks about right.

I used to run it here, using forgejo, a fork of gitea, instead. I set it up here at home before doing the same at $JOB. They have a good tutorial if you use mysql or sqlite. Though, I chose postgresql -- no sense running multiple DBMSes for different apps.

I switched from gitea to forgejo because the gitea folks hadn't updated to fix some CVEs for a while. Whereas forgejo, a fork of gitea, appears to do a better job of publishing new releases to fix security bugs.
 
hmm, I did sudo pkg install gitea and did a few permission changes. It ran fine, but it's using sqlite and it's pointing to whatever directory it though was swell for the repos. I'm struggling to figure out how to switch it over to mysql and my preferred directories. It's challenging, because it doesn't start and I can't figure out what's going on. The instructions are very linux centric.
 
I have been setting up some scripts for things like this. I have a gitea script "started" -i.e. it "works" but it's in pretty rough shape. My script uses postgres though.

I started with this: https://github.com/ConorBeh/iocage-plugin-gitea
and started modifying it. If I remember right, the initial startup is a bit wonky and I have this note in my script:

# Installer only comes up if there is no config so we nuke it to be sure.
rm /usr/local/etc/gitea/conf/app.ini 2>/dev/null

I will try to get my script working better and in a package to share.
 
figured out how to do git over ssh, which seemed like such a mystery 15 years ago, but was drop dead easy today and I have lost all interest in git via http :)... so long gitea, gitlab and scm-manager. Sheesh, why I didn't figure this out sooner is beyond me.
 
yes. I've been using scm-server for a bit over 10 years. It's great, but I really only use it as a git server that serves up clonable urls. I remember way back that you could host via ssh, but I couldn't figure it out back then - maybe git clients didn't have good ssh support, maybe the docs were unclear, dunno, but setting up scm manager was super easy (back when it was a warfile you could drop into tomcat), so I went with it. When I heard about gitea a couple of days ago, I thought it might be nice as a replacement for scm manager. As I was digging into all of the ways my install of gitea was going south, I kept coming across git over ssh q&a's.

Duh, I know ssh pretty well these days and it occurred to me that remotes in git were just urls and if it supported ssh, I oughtta be able to just use an ssh url, my authorized_keys I'm using for bouncing around the network, and get a Bob' your uncle, that was easy configuration of git over ssh with all the living on zfs benefits of the scm-server setup, but without all the headache setting up and sure enough. I did a few
Code:
for i in allmyrepos; do clone $i;done
's across my dev machines, and all done. Sure, I don't get a fancy web listing, but how hard is
ls /git/repos on my server or
ssh gitserver ls /git/repos from a remote system? For some reason, I feel liberated and chagrined at the same time that it took me so long to realize this was the way!
 
Yes, a git server does not have to be complicated (simple is nice). I started to set up a client/server tcp thing to retrieve a list of repos but I haven't gotten it all done. My client would ping the server (daemon) and the server would write a pipe with all the directories.

My thoughts on setting up a minimal git server.
Server side:
1. Create a user on the server called `git`.
2. Make the git user's home directory to the repositiory directory on the server. example: `/var/db/repositories/git`.

Local side:
1. Add an entry into your `~/.ssh/config` file for easier entry.
Code:
    Host git.local      # or whatever your server/jail is called.
            User git
            Hostname 192.168.x.x
            IdentityFile ~/.ssh/id_rsa
2. Add your public key for the git user so you don't have to use a password.
Code:
    % ssh-copy-id -i ~/.ssh/id_rsa.pub git
3. Create a bare repository.
Code:
    % cd ~/.git-repositories
    % git init --bare temp.git
4. Put it on the server.
Code:
    % scp -r temp.git git@git.local:git/temp.git
5. Clone from the server.
Code:
    % cd ~/place/to/code/
    % git clone git@git.local:git/temp.git
 
for the record, moving this around is soooo much easier :). Reimaged server as another os (dare I say debian), and it was a matter of importing the pool, creating the git user, restoring authorized_keys, chowning the repo, et voila - all done.
 
figured out how to do git over ssh, which seemed like such a mystery 15 years ago, but was drop dead easy today and I have lost all interest in git via http :)... so long gitea, gitlab and scm-manager. Sheesh, why I didn't figure this out sooner is beyond me.
I did the same a couple of months ago. There's no need for the extra complexity.
 
Back
Top