lainchan / Ω
Self hosted Git websites
SHODAN · 2020-08-21 19:51
What are some nice alternatives to GitHub, BitBucket, and the main GitLab instance? How likely are they to die?
Ender · 2020-08-21 20:08
I like cgit if you just want something minimal. You can of course host gitlab if you need the whole package.
Yu-ichi · 2020-08-21 21:22
>>31340
Self-hosted [Gitea](https://gitea.io). Can't rely 100% on services you don't run yourself.
Second-best option is [Sourcehut](https://sr.ht/). It's basically a one-person project to provide a Github alternative, run by someone fiercely devoted to Free Software.
Agent Jones · 2020-08-21 21:41
>>31340
Gitweb
>>31341
>>31344
Why cgit/gitea/whatever instead of gitweb? gitweb just works and has more features than cgit (i.e. it uses git-archive so you can download a .tar of a specific commit), also gitweb is included in the git package, /usr/share/gitweb, you'll have that directory if you have git installed.
Spike Spiegel · 2020-08-22 03:08
>>31345
Never used or heard of cgit or gitweb. I can't comment on them one way or the other. But I can wholeheartedly endorse Gitea for its ease of installation, zero maintenance, and no external dependencies. (Though it is a good idea to run it behind a TLS-capable reverse proxy.)
A few minutes reading on Cgit makes it look really interesting, though. I might play around with it. I wouldn't need the performance advantage but it's always fun to play with new selfhosted server software.
Also, I was having a dumb and forgot that lainchan doesn't do markdown. I feel like such a noob.
Meddler · 2020-08-22 15:04
I did a quick review for anyone who didn't know anything about these (like me)
>>31344
>[Sourcehut](https://sr.ht/)
>payment is currently optional
Ok for the niche market that require it, but it is "re-inventing the wheel" for others. Appears minimal. Appears to be a sole developer, pet project.
>>31341
>cgit
>>31345
> gitweb just works and has more features than cgit
cgit does what gitweb does, but less. gitweb is used to create a self-hosted git server
>>31344
>Self-hosted [Gitea](https://gitea.io).
>Coded in Go
Needs to install separate bundle, rather than it working with git natively like GitHub , GitLabs, etc.
I would be interested in a simple git blogging solution, something like:
$git publish /public/project_foo to http://my_website.com/projects/
$git publish /public/page.html to http://my_website.com/www/
As I understand it, I would have to install git on the web server somehow?
Acid Burn · 2020-08-22 18:29
gitolite is quite qt.
One configures multiple repositories and users in a "super" git repository. Once the changes are pushed, the configuration will be applied. To access the server, a special ssh user is used. The mapping to virtual gitolite users is done via the ssh public key stored in this configuration repository.
On the other side, there are no additional features. No web. No issue tracker. Nothing. However, an integration with cgit is easy.
Pris · 2020-08-22 19:14
>>31365
I mean, you can just use stagit (static page) and generate new htmls files everytime you made a commit, or just use cgit or gitweb, i've been using gitweb for three hundred years, and it is very good.
Elliot Alderson · 2020-08-22 19:25
>>31386
Thanks lainon!
HELIOS · 2020-08-22 19:32
>>31388
Anytime, are you using apache or nginx? nginx is easier to configure, and better for gitweb in this case because... it is easier to configure...
Six · 2020-08-22 20:02
>>31390
It's different for different servers, but as long as I know it can work I'll figure it out. Thanks!
Joe Bloggs · 2020-08-22 20:07
>>31390
Just going to throw out a suggestion for lighttpd. Very easy and flexible configuration, and a bit less resource hungry.
Nguoi La · 2020-08-23 16:36
>>31340
I've been self hosting 'kallithea' for source code management via git for quite some time and can definitely recommend it.
https://kallithea-scm.org
Dox · 2020-09-02 15:17
no one has mentioned p2p solutions
+there is GitCenter, which runs on Zeronet, its very succesful there
+the other is Radicle, an extended version of Git inspired by SSB/scuttlebutt
as a side note, gitlab, gitea, sourcehut and others are working together to bring their platforms to the fediverse/activitypub https://forgefed.peers.community/
Six · 2020-09-21 14:55
>>31386
I'm a big fan of stagit, it's very lightweight, convenient, the UI makes sense, and it can run on about anything (you can view the front-end from a text-based browser).
>and generate new htmls files everytime you made a commit
I wanted to add, you can use a post-recieve hook on your repo to run stagit and remove the manual element. It's a fairly straightforward task to have post-recieve run a shell script to operate stagit, link stylesheets to each repo page, and so on, each time you commit.
Zero Cool · 2020-09-21 15:17
https://libregit.org
https://notabug.org
https://codeberg.org
https://git.disroot.org
https://git.snopyta.org
Pick your poison. :)
Joey · 2020-09-21 15:40
>>32888
OP here, I picked Codeberg a long time ago.
e085409b2286d70979825d4ec072da77 · 2020-09-21 20:34
>>31340
it depends on your skill and usage.
If you just run git for yourself :
* install git on a self hosted machine with static ip, you can (optional) attach this machine a domain name, then sync your git repos with only ssh protocol.
Il you want to be independant from all other website but can offer / share repos : gitea or gogs self hosted.
If you're paranoid enough you can also use a thumbdrive or simple usbdrive with file protocol.
Juste keep in mind to initiate a new repo remotely to access it.
Emmanuel · 2020-09-22 23:48
>>31344
I can vouch for Gitea. It was pretty straightforward to set up in an rpi3 (well, kinda, but it all went well in the end), and once set up I forgot about it.
I want to try to host sourcehut with all its modules or whatever they're called, but I feel like it's a lot and I don't wanna use my personal computer to host all of it.
Lady 3Jane.. · 2020-09-23 11:19
How about just having a git server on your own server? I have my important github projects also mirrored on a private server. If anything happens to the centralized system, i can just clone my private repo and push it somewhere else.
Besides that I think it makes sense to use stuff like github if you want to have it openly available.
Nguoi La · 2020-09-23 11:44
Why isn't there a federated git software? Like mastodon, pleroma... but for Git?
The Oracle · 2020-09-23 12:21
>>32965
>I can vouch for Gitea. It was pretty straightforward to set up in an rpi3 (well, kinda, but it all went well in the end), and once set up I forgot about it.
Gitea is my inspiration for my own projects in that way. I aim for set-up-once-and-forget high reliability. Of course it all takes longer because I'm an evenings-and-weekends non-professional amateur programmer, but I still think it's a goal to aim for.
Unknown · 2020-09-23 13:04
>>33008
I still have to use GitHub if I want to contribute to projects and make pull requests, although I just make a different identity on GitHub and keep hosting my repos on wherever I have settled. I will never mirror my projects to GitHub.
Acid Burn · 2020-09-23 15:53
>>33009
Depending on how its set up git is already kind of federated. At least in the sense that you can push and pull changes between repos hosted on different servers. If you mean why isn't there a federated version of github/gitlab's social features (issue tracker, accounts, etc.) then idk but it's a good idea. I'm sure activitypub could support that kind of thing. I'm also curious as to why there isn't a way to host a git repo as a distributed ledger. It seems like git's architecture would be amenable to blockchain encoding.
Wintermute · 2020-09-24 04:37
>>33009
sourcehut, gitea and gitlab are both looking into becoming part of the fediverse, but it turns out that they need an adition to the activitypub protocol:
https://www.w3.org/TR/activitystreams-core/
Haruyoshi · 2020-10-06 01:58
>>31340
If you want something minimal (i.e. a static site representing your repo), try stagit.
https://git.codemadness.org/stagit/
Bob Arctor · 2020-10-06 07:02
>>31340
Self hosting a git server is pretty darned simple. A lot of tutorials online.
If you don't care about a web UI, all it takes to setup a repository is:
apt install git-core
mkdir my-project.git
cd my-project.git
git init --bare
git add remote my-serv user@127.0.0.1:/path/to/my-project.git
That's about it. If you use a non-default ssh key directory or port, you need to add an ssh alias to your git server.
vim ~/.ssh/config
Host gitserv
HostName 127.0.0.1
User user
IdentityFIle /path/to/idrsa
Port 22
Then you add the alias as the git remote
git remote add my-serv gitserv:/path/to/my-project.git
Unspecified · 2020-10-06 22:48
On topic of self hosted git interfaces, are there self hosted CI/CD services (ideally ones that play nice with self hosted gits)?
Debbie Charteris · 2020-11-10 06:50
Does anyone know what web interface suckless uses for their git projects? I can't seem to find it.
Anonymous · 2020-11-10 07:03
>>35975
They use stagit.
Cgit is another alternative.
Just another Random Lainon · 2020-11-10 09:33
>>31340
>What are some nice alternatives to GitHub, BitBucket, and the main GitLab instance? How likely are they to die?
A USB stick with a bare repo as the remote. They don't really die much, but you can always make more remotes on a stick as a backup.
>>31344
>Gitea
Gitea is great, until you do a minor version bump and it soykafs the bed with the database schema. I stopped using gitea after that happened once.
>>31365
>I would be interested in a simple git blogging solution
Why do you want to self host it if Github/Gitlab pages can do that for free?
Jean Dupont · 2020-11-10 12:41
>>35976
Thanks, stagit is correct.