Hacker News new | past | comments | ask | show | jobs | submit login

Is there an easy way to do that ? Some script available somewhere ?



What I do is run Gitolite in a cheap VPS and then use https://github.com/miracle2k/gitolite-simple-mirror to automatically mirror the gitolite repositories to github and gitlab.


I have a script [0] that almost does this, but currently only downloads forks. Could easily be modified to work on all types of repos. Maybe one day I'll get around to doing that myself, hopefully before any spurious lockouts... but then again I usually create the repo locally first and push to GH later, so I should have all my repos already.

Also this only does the initial cloning, I still need to implement pulling down new commits.

But, the majority of the boilerplate is taken care of, like for authenticating to their API.

PRs welcome! And don't forget to fork it ;)

[0]: https://github.com/TwoRingSoft/tools/blob/master/bin/sync-fo...


I found that Clockfort's Github-Backup is good for downloading an account's repositories en masse. It only supports repos though, and not metadata like issues, comments, wikis, pull requests, etc.

https://github.com/clockfort/GitHub-Backup


We just pay for this: https://backhub.co/


You can write a simple GitHub action that pushes your repo to GitLab/BitBucket etc every 30 minutes or something.


Probably better to have the action run on every push to master, no point running it every 30 mins if it hasn't been updated in months...


Do you know an example of this?


Here's one I found on the Actions marketplace.

https://github.com/marketplace/actions/mirroring-repository




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: