←back to thread

160 points MattIPv4 | 1 comments | | HN request time: 0.229s | source
Show context
retrocryptid ◴[] No.36407521[source]
I'm currently hosting a git repo on my home machine and it's used by me when I'm on the road and a few people I trust enough to have logins on my DMZ machine.

It seems there should be an easy way to use gitlab or github as a public read-only proxy to changes that are released on the private repo. And then going the other way, sucks up PRs from public sites and lovingly integrates them into the "real" repo on my home machine.

Yes. There are security ramifications. There are availability ramifications. I seems slightly to be trying to skirt GitLab's policies they're probably putting into effect to avoid going bankrupt. But the flip-side is I really don't need a wiki or a bug tracker or whatever else GitLab is working on. I would pay a small amount of cash to just get a public repo mirror.

And we all have different ideas about how to make this "easy". I don't mind running scripts on my local host, but would like to avoid polling the public repo to see if someone's posted a PR. I also don't want to have to run a script in a container on the public repo. So would love it if you could set the public repo to proxy PRs to a remote repo.

Just curious if anyone else has similar requirements. Maybe you have a corporate repo and want to mirror it to a public site like GitLab, GitHub or SourceHut. Maybe, like me, *you* just want a remote repo to stash your code but a public location so your home server doesn't melt down that one time someone slashdots your project.

replies(4): >>36407548 #>>36407593 #>>36407705 #>>36411120 #
sz4kerto ◴[] No.36407548[source]
Gitea supports push mirrors.
replies(2): >>36407642 #>>36407694 #
simcop2387 ◴[] No.36407694[source]
Not just push mirrors but pull mirrors and push+pull mirrors. I frequently use the pull mirrors to backup repos that I don't trust to stay around (either because they might break a TOS or be right on the line, or i expect the author to not leave it around for some reason). It's definitely become one of my "must have" for any kind of local hosting stuff esp since the docker images make it basically painless to deploy.
replies(1): >>36407909 #
1. retrocryptid ◴[] No.36407909[source]
Yeah. I don't want to set up docker. I just want the public server to mirror the PR by pushing it to my private server. Launching docker to diff the public mirror against the private server isn't completely out of the question. It just seems "inelegant." But I dislike it less than I dislike the idea of running a cron job on the private server to poll the public server.

Thanks for the suggestion, though. I may go ahead with something like this.