Hacker News new | ask | show | jobs
by galleywest200 1132 days ago
Gitea's ability to create a local repository as mirror of a remote repository is great for this. You can stay on Github and have your code regularly mirrored locally.
3 comments

If only Git had this sort of functionality built in…
Pretty sure git can not continuously pull/push the mirrored repo like this feature does, by default every 10 minutes.
This is a one line cron job
Just a mounted drive over sshfs...
Gitea can run your CI actions too, and host your releases.
I have this setup running on a Synology NAS at home. I'm currently syncing all of my starred github repos to local storage using a short bash script that runs once a week. Once a repo is in gitea, it pulls any new updates from github every 6 hours or so. It's mostly for archival purposes, just in case something majorly bad happens to github.
Would you share your setup?

I'm interested in building the same but if yours already works well then I see no point in duplicating important work.

Sure!

Here's a gist to the script: https://gist.github.com/sklarsa/845152721ee9292eb01f70756b89...

As for gitea, I'm just hosting it using Docker and orchestrating using a simple docker-compose file that maps the gitea data directory to a Volume on the synology: https://gist.github.com/sklarsa/0dd6d6094dac6bf6e7bf61df9ca5...

It's all hosted on my private network at home.

Or use Gitlab. I remember doing a mirror syncing from Github with one of my gitlab repository. The main reason I used to do it is Gitlab offer free built-in CI at that time In my case one of most important thing is the GitOps workflow. It's single source of truth so it's also single point of failure ;(