I run a Gitea instance on my Synology to act as a source for flux2 on the living room Kubernetes cluster. I don't want to have that on Github so it'll all work without internet connectivity (still a WIP though). I had my own Gitlab for a long time but at some point its hunger for resources made it uneconomic for my use case. Gitea does less but in a fraction of the resources.
If you want fancier stuff like integrated CI/CD that is more common out there, Gitlab is an option, but running it by yourself it's not as simple (as gitea), for example.
Apart from that, a fact is that gitea is less resource hungry, so it runs well even in modest configurations.
If you need to add more people, but don't require access right for the git repos (i.e. everyone will be able to force push). Still use ssh, but create a git user and git-shell as the shell to improve security.
If you want to go one step up, I was looking at soft-serve, however it's too immature yet. So I added a git-shell-commands folder and added list command that will list my git repos.
It's really simple!
If you need access rights and reviews, things will be a bit more complicated. Although git-shell seems pretty easy to add some access rules to, if not gitolite is better. For browsing, cgit and gitweb should be obvious choices, however I don't really see the point for a minor site.
For code review, I'm really voting for git-appraise to take off. Once I get a coworker, that's what we will be using.
This! I think many people don't realize how easy it is to host git repositories over just pure ssh. I backup all my git repositories this way, and also have a usb disk drive with backups (which is super easy to setup, just add a git remote with a unix path to where you wanna send it). Each repository I have have three remotes (`origin` which is usually GitHub/Codeberg, `ssh` which is my remote backup and `usb` which is my disk drive). My alias `gp` pushes the current branch to all three simultaneously.
As mprime1 replied, it's more on the lines of firing up the terminal to create the git repository. Then go back to your local system and git clone/pull the thing. Then you fire up your local VSCode and work on it and then finally push the changes. This way the whole team can work seamlessly and implement CI/CD while addressing conflicts in real time.
What you are talking about is a beautiful way to work on a remote machine (especially the headless ones) but only when you are the single dev. For a team, you gotta go the other way.
If you also want public access over http you can activate one of the default hooks (so a single "rename a file" command on the server) and then export it using literally any web server software (as it is a folder of dumb files).
Are you saying that I can self-host and have the same "review" functionality as GitHub when reviewing PR's?
IIRC Gitolite was aquired by Gitlab a while back, Gitweb is not really a git hosting, it's more like a web view of your `git log`
Gitlab needs at least a couple of gigs of RAM to run well, double/triple that if you need CI/CD.
I have no experience wiht gogs/gitea.
We ran an gitlab instance for about eight years and it worked flawlesly[1] for a team of ~20, with quite a few active repos (i.e. constantly pushing), some of them being generously large, running several pipelines on most of them.
PS: gitorious was aquired by gitlab, not gitolite. My bad.
[1]: once we pumped up _LOT_ of RAM into it that is
I cannot disclose details (we are premium customer and the bug reports would disclose my employer and identity), but every second week our Gitlab integration is blocked by some real shitty bug. Most common thing: Gitlab has a feature we need, but its only usable via WebUI and the API endpoint is broken or lacking in necessary details. So we cannot automate things that are very manpower-intensive.
Most of our devs were annoyed by some external toolings that supported Github but not Gitlab, Gitlab being slow or down, markdown rendering being terrible slow as well as almost all of the PR additions (e.g. eslint checks, test coverage reports etc) being in the top tiers (with pricings being out of scope for us).
Gitweb can work quite nicely with gitolite to provide a web view of your repositories, with access control managed by gitolite.
However I once saw a small team try that approach and it caused endless problems related to permissions and ownership of the files on the remote system. Maybe things have improved or with a better setup it would be easier but from my experience 0/10 would not recommend.
In that scenario -- where you have a small team and want a remote host for the repos but you don't want all the other baggage -- I've found gitolite to be a good solution. It provides a simple access control layer to handle the multiple git users and basic security requirements while using only a single local user on the server side. Otherwise it stays out of your way and it's mostly just a smart use of git hooks so it's very lightweight.
Lightweight (can run on a RPi unlike GitLab), does everything you expect, can work with SQLite or MySQL/MariaDB or PostgreSQL, and can sync remote (GitHub/Bitbucket/whatever) repositories locally.
user@remote ~ > git init --bare myproject.git
user@local myproject > git remote add vps user@remote:myproject.gitThe [-ro] gives the readonly access. I use git-shell to prevent normal ssh access to the server on those accounts.
That said, I think what the OP actually wants it a web front-end.
My experience (as a user) has been pretty good, though I was not involved in the adminstration/setup related aspects but I have been told it doesn't require a lot of maintenance effort.
[1] https://github.com/theonedev/onedev [2] https://code.onedev.io/
Turns out it makes for a great self-hosted git solution, so I made a git remote plugin that allows you to interact with it using regular vanilla git commands: https://github.com/redwood/redwood/tree/libp2p-connectivity2...
[0] https://fossil-scm.org/ (created by Richard Hipp, the guy that made SQLite)
https://github.com/gitbucket/gitbucket
That's a single .WAR file, running under Java which was nice and easy to get started with, and even has support for some trivial CI/CD actions. Unfortunately a sudden death of the docker container it was running with corrupted the internal database to the extent that it wouldn't restart. (All my repositories were fine, on-disk, but the issues and similar stuff was mangled beyond belief.)
At that point I realized that I didn't use the issues, or pull-request facilities except very very rarely, so I switched to using bare repositories on a remotely hosted virtual-server.
I only collaborate with folks who I trust enough to give accounts, which means most are just personal repos.
Running this way does involve more moving parts, but every part is relatively self-contained and we can replace one thing without disrupting everything.
[Edit] one other benefit I should add, all the other services like code review and CI are compatible with git and svn, so the development teams have consistent tools regardless which vcs they're running for a particular project.
[1] https://github.com/cbdevnet/fugit [2] https://git.zx2c4.com/cgit/
Gitweb does not belong, it is just a repository viewer.
ReactOS is a fine example of this: [1]
I used to run gitolite (pre Github's existence :P) and I'm thinking about gitea, but for now I am very happy with my setup.
Access via ssh://git@server:~/myproj1.git.
I guess I would like a web interface that ran locally to provide other features, but the close to 0-maintenance and complete privacy of this works for me.
I'm looking at alternatives.
But, if you have your mind set: GitLab is great.
(It WILL break at one point or another, and you will need to do recovery)