SourceHut ( https://sr.ht ) is open source, although I've never tried setting it up for self-hosting. Anyone here with experience?
Poll: Self Hosting Git Repositories
41–50 of 86 posts
Re: Poll: Self Hosting Git Repositories
#42Re: Poll: Self Hosting Git Repositories
#43Re: Poll: Self Hosting Git Repositories
#44I voted "other": I just put bare git repositories on my VPS, and interact with them over SSH. Tiny and simple cgit exposes a read-only HTTPS interface for the repos that I want to share publicly.
user@remote ~ > git init --bare myproject.git
user@local myproject > git remote add vps user@remote:myproject.gitRe: Poll: Self Hosting Git Repositories
#45Re: Poll: Self Hosting Git Repositories
#46Re: Poll: Self Hosting Git Repositories
#47If you don't need a front-end, push and pull directly from git. https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-...
I am surprised that this got downvoted so quickly without comment. I'd genuinely like to know what the downsides of doing it this way would be. Having to manage your own SSH keys seems like a problem, but I don't know what the others would be since my needs aren't very big.
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.
Re: Poll: Self Hosting Git Repositories
#48Gitea (originally a fork of Gogs) is moving fast, and they are adding ActivityPub federation support to the software. This will allow you to collaborate with projects hosted on remote Gitea instances (and other software once they add federation support too). If you are working on FOSS then Codeberg [1] is a good Gitea instance, which offer Woodpecker CI and Codeberg Pages. [1] https://codeberg.org
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.
Re: Poll: Self Hosting Git Repositories
#49if it's for personal use and no access rights are needed, just use ssh. 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 adde…
Re: Poll: Self Hosting Git Repositories
#50You may want to give more details about your usecase: do you need _only_ git hosting or other features too (e.g. issue tracker, CI/CD pipelines)? How many users will use this setup? Do you have a dedicated machine or you run it locally (e.g. in a docker container?? Hosting locally or in cloud? 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…
Gitweb can work quite nicely with gitolite to provide a web view of your repositories, with access control managed by gitolite.