Readit News logoReadit News
rapnie · 3 years ago
Most exciting that they are working on federation support that'll tie individual self-hosted servers together.

https://nlnet.nl/project/Gitea/

zxcvbn4038 · 3 years ago
I’ve been using gitea for a number of years - before GitHub started letting people have private repos for free it was about the only option for a self hosted private repo with a GUI. It’s written in Go which makes it very convenient to run from a usb stick. It also has a feature to mirror other repos and I use that to keep local copies of projects I follow - and has saved me a couple times when the project authors decided to delete their repos or YouTube decided to not host them. Today I use gitea to host my private development server as a Tor hidden service which makes it easily accessible from almost anywhere - though many major hotels chains will ban your MAC address locally if they see you connecting to Tor servers, but never had issues while at an AirBNB which is where I spend most of my time these days.
tbrownaw · 3 years ago
> as a Tor hidden service which makes it easily accessible from almost anywhere

I have a wireguard with the server running on a small VPS, which is useful for both ignoring filtering on public wifi and getting into my home network from wherever.

quaintdev · 3 years ago
I'm thinking of doing this but at the same time I'm afraid of exposing my home network to a remote VPS. Am I being too paranoid about this?

If I do go this route do you have any suggestions with respect to security?

jacooper · 3 years ago
I think headscale/ other mesh vpns would be better choices so you can get direct connection to your home instead of passing everything through the VPS.
macspoofing · 3 years ago
>it was about the only option for a self hosted private repo with a GUI.

Bitbucket had free private repos for a long time. There were other services as well.

mwint · 3 years ago
Side track, but what circumstances/choices lead to spending most of your time at AirBnB’s?
zxcvbn4038 · 3 years ago
I didn’t leave my apartment for two years because of Covid and decided a change of scenery would be nice, so my family and I have been bouncing around rural AirBNBs for about six months. Though we’ll have to go back in another month - my son really wants to go back to in-person schooling, that is starting soon. But back to the woods as soon as he gets tired of high school life!
mr90210 · 3 years ago
Was Gitlab around?
Macha · 3 years ago
Timeline:

2008: Github launched

2008: Bitbucket launched

2010: Atlassian purchases bitbucket, makes private repos free

2011: Gitlab launched

2014: Gogs (Gitea's predecessor) first public release

2016: Gitea forks from Gogs

So at the very least, bitbucket was established and gitlab was around

jonnycomputer · 3 years ago
Gitlab is great, but it also is pretty resource hungry. I opted for Gitea for that reason, so it would be viable on the cheapest Linode server option, and I've mostly been satisfied with it, thus far.
abdusco · 3 years ago
One great feature of Gitea is that you can create private repos without using the UI/CLI by adding a git remote.

    git remote add origin https://my.gitea/user/new_repo
    git push
    # user/new_repo is created as a private repo

Super cool. Does Github have such a feature?

INTPenis · 3 years ago
Not sure about Github but Gitlab does. It just creates a new repo under your account when you push to a non-existing one. Seems like a very basic feature to me.

And the default setting happens to be private.

unqueued · 3 years ago
For GitHub, using the hub[1] client, you can simply do:

  hub create -p
That will create a new private repo, matching the name of your repository.

What I will often do if I want to instantly mirror something to github:

  hub create -p --remote-name=github
Which will create a new remote with that name. Otherwise origin will be used, which can conflict if you already have an origin remote.

It is also less typing.

[1]: https://github.com/github/hub

phpisthebest · 3 years ago
I dislike organizations that take open source things like git, and then extend them to add features making them propriety work flow lock in making it hard to move to a new platform

Another company was famous for this, they used to call it Embrace, Extend, Extinguish

filmgirlcw · 3 years ago
Not sure if doing it that way will create a private repo or not (at the airport and I can’t check), but you can use the GitHub CLI to do it. I’m a huge fan of the CLI, but obviously being able to do it without that is nice.

https://docs.github.com/en/get-started/quickstart/create-a-r...

ajnin · 3 years ago
Gitlab does, as well as gitolite (which is a very lightweight, repository-only solution without a GUI or any of the fancy features like merge requests but it's perfect for my personal needs. Repo creation on push it the main feature that made me choose it. It is administered through git as well which I think is nice).
gurjeet · 3 years ago
Notably, SourceHut has this feature.
madacol · 3 years ago
Just tested, github fails
rascul · 3 years ago
I find Gitea to be great. Also there is a curated list of awesome projects related to Gitea:

https://gitea.com/gitea/awesome-gitea

KronisLV · 3 years ago
I recently moved over from self-hosting GitLab to instead having Gitea, Nexus and Drone, because the burden of keeping GitLab up to date was cumbersome, given how it's such a large and complicated software package.

I wrote about it in my blog post "Goodbye GitLab; Hello Gitea, Nexus and Drone": https://blog.kronis.dev/articles/goodbye-gitlab-hello-gitea-...

That said, I still find the UI of GitHub and GitLab to be a bit better than Gitea's (the whole organizations/groups navigation feels better), though Gitea is immeasurably more performant when compared to GitLab, especially when the available hardware resources are limited - in the case of 4 GB of RAM being all that I could afford, it's the difference between a really snappy and annoyingly laggy UI.

Admittedly, now it's Nexus that loves eating my resources, though for the most part having software like it for managing most of my container images and other packages is pretty cool and worthwhile, though one might also want to explore the alternatives, such as Artifactory or something else.

Also, personally I find Drone to be a bit less capable than GitLab CI and its documentation isn't quite as good in comparison - though that's a given, since it's an external tool developed by another company. Though I guess even Jenkins would also be a viable alternative (despite it having certain issues with plugin stability etc.), or many other CI tools, given that Gitea is actually decently supported!

In summary, even if there still are a few challenges here and there, the whole setup is a lovely way to self-host your own projects and everything around them in a cost effective manner and whilst also staying in control over your own data. Gitea is an important part of this and overall I'm really glad that we have cool software like it nowadays!

At the same time, I'm more than happy to use GitLab or something like it at work, as long as keeping it working nicely, up to date (and paying for the servers) is someone else's responsibility.

qbasic_forever · 3 years ago
You'll probably be happy to see the 1.17 dev version of gitea (which should be the next major release) actually has an artifact repository built in and it can even host docker images: https://docs.gitea.io/en-us/packages/overview/ You have to build the branch yourself right now though, despite being in the docs it's not in the release downloads yet. You might be able to get rid of nexus and just use this built in registry.
KronisLV · 3 years ago
That's actually pretty cool to hear!

Though a problem that I ran into with GitLab Registry was that sometimes the Docker image cleanup wasn't done properly and old layers kept lingering around and eating a lot of space. I sort of fixed it with some cleanup scripts and the occasional manual actions, but it still was a bit problematic since running out of space was a very real risk.

Nexus does appear to have similar issues, should you use it as an intermediary for CI image builds (e.g. tag it with branch-date and tell your cluster to redeploy the image), but at least it has instructions for cleaning it up that work most of the time: https://help.sonatype.com/repomanager3/nexus-repository-admi...

Personally, I think that using the same software package for storing build artifacts and the source code itself is a bit risky, but maybe Gitea will be able to tackle those challenges with no significant issues!

jonnycomputer · 3 years ago
I just discovered that the latest gitea supports package repositories. I'd like to see something that works for R packages without too much hassle.
Inversechi · 3 years ago
By Drone do you mean the `0.8` open source version? If you've not tried Woodpecker it built upon the `0.8` code and added lots of nice functionality, has better documentation, and is in active development.

https://woodpecker-ci.org/

KronisLV · 3 years ago
I mean the currently available 2.X set of versions: https://docs.drone.io/server/provider/gitea/

Its source code is also available on GitHub: https://github.com/harness/drone/releases

Of course, the point about their license is a good one, which definitely has some limitations on what you can do with it: https://github.com/harness/drone/blob/master/LICENSE (I wish I earnt 5 million $ and this would be a problem I'd have to think about).

Thanks for bringing up Woodpecker, though, it also seems like a nice project and the two CI solutions haven't diverged far enough for migrating over from one to another to be too problematic, should that become relevant in the future: https://github.com/woodpecker-ci/woodpecker

Of course, as I said, some folks might also prefer something like Jenkins or another CI solution. I'm yet to explore most of the packages out there!

jonnycomputer · 3 years ago
I wanted to self-host a git server, and because I use gitlab at work, that was my first choice. But the system requirements for gitlab were too heavy for the linode I was running, so I went with gitea. Linode also had a handy install-script to set everything up painlessly.

I concur with your overall assessment.

Deleted Comment

bluehatbrit · 3 years ago
Mind if I ask how you're hosting this setup, are you using something like k8s or swarm? If so how are you handling persistence, just normal volumes? I imagine if you were to lose data, that'd be pretty bad.
KronisLV · 3 years ago
Currently using Docker Swarm with bind mounts instead of volumes, because they're a bit easier to work with, backup-wise.

Infrastructure wise, there are a few VPSes from a local provider (https://www.time4vps.com/?affid=5294 affiliate link), though I've also used DigitalOcean, Hetzner, Scaleway and others in the past, AWS, GCP and Azure would work as well, though would be much more expensive. For executing CI tasks and backing up the data, i have a few servers on my desk (though regular towers with passive cooling, instead of the rack mounted kind), since those are more cost effective, especially storage wise.

The actual files are backed up with BackupPC over the network automatically, at a set interval, to another server: https://backuppc.github.io/backuppc/ Then, of course, the backup server data is occasionally sent to another server in my local network, just to spread it around more, in case of disk failures or one of the servers shorting out.

Admittedly, it's a lot like using regular rsync with cron, although the benefits of BackupPC are being able to really easily restore files, as well as having incremental backups with compression.

It is a bit rudimentary as far as handling data goes, but sometimes that's all that you need: https://blog.kronis.dev/tutorials/simple-ways-to-do-backups

Alternatively, one might also achieve the same result with something like Bacula, Kubernetes with either hostPath or maybe even just a NFS mount. Other folks might prefer something like GlusterFS or a similar distributed storage solution, or something like Longhorn for Kubernetes in particular.

mkesper · 3 years ago
Maintaining Jenkins and its gazillions of plugins is such a hassle I'd never consider it for a new project.
3np · 3 years ago
From an effort-cost-to-performance perspective, Gitea (or equivalent) scores very high if you're considering software to self-host.

Practically infinite private repos, privacy, automate/customize all you want.

jasonjayr · 3 years ago
It can also serve as an OIDC IdP[1], which makes it handy to be the linchpin for a bunch of developer services with SSO.

1: https://docs.gitea.io/en-us/oauth2-provider/

Loic · 3 years ago
You get access to the organizations in which the user is, which is really nice to provide access to other company services based on this information.

A small example, we create users for our customers in gitea and they are only part of the "customer" organization. This automatically get them access to the "customer" worklog as they access the customer area. So gitea is for us the central identity management.

chrismorgan · 3 years ago
I don’t feel that “Git service” is quite doing it justice. If it were just a Git service, I don’t think it’d have the social features: repository namespacing, user accounts (at least to the extent it has them), issue tracking, pull requests, release management, wiki, watching/starring/forking…

Now as it happens, I actively don’t want any of that stuff for something I’m hosting for myself for my own projects only. I pretty much just want the parts you’d get in gitweb or cgit, but done better (since neither of those is very good; I run gitweb because I wasn’t impressed with either, but gitweb was easier to patch into a more acceptable shape). Is Gitea capable of being pared down to just this? Is there anything else that fills this niche?

lapser · 3 years ago
Sure Gitea does a bit too much for a single individual, but you don't have to use the additional features. Honestly, the UX of gitweb is pretty bad so even if Gitea has too much, it's still better than gitweb. Who knows, maybe someone will clone a Gitea and rip out all the social features from it.
Tmpod · 3 years ago
You could try setup just a git.sr.ht instance, I suppose. Dunno if it is what you're looking for, but it might be worth checking out.
chrismorgan · 3 years ago
As regards features, git.sr.ht is certainly lighter than Gitea, but still suffers from various of the same problems because it’s designed to run the show with social operation, rather than just doing read-only publication of repositories that it finds at such-and-such a location. It doesn’t have as much extraneous and undesirable functionality (e.g. no issue tracking), but when setting it up requires PostgreSQL and Redis (which latter I think you may be able to skip, but it’s hard-required in the systemd units I see) and more… yeah, this is not what I’m looking for. Operationally, Gitea is considerably lighter than git.sr.ht, as you can get it going with only Git and SQLite installed.
lmas · 3 years ago
I've been thinking of making Yet Another Git Repo Browser™ from scratch these last couple of years, with features I've been missing in gitweb and with a cleaner/more familiar UI. Maybe it's time to revive that old prototype.

What issues did you have with gitweb? And what stuff did you patch up?

chrismorgan · 3 years ago
https://git.chrismorgan.info/gitweb/log

It’s not everything I’d like changed, but it’s everything I have changed.

pvinis · 3 years ago
im trying to remember one. I used it and I think you will like it. but it's been a while and i am forgetful!

it was something short, the url too. it was sh or st something.

can anyone get which one I mean?

edit: YES! it's sr.ht. thanks, commenter below this :)